titan-cli 0.1.17__tar.gz → 0.2.0__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.
- {titan_cli-0.1.17 → titan_cli-0.2.0}/PKG-INFO +7 -4
- {titan_cli-0.1.17 → titan_cli-0.2.0}/pyproject.toml +9 -2
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/logging/config.py +6 -1
- titan_cli-0.2.0/titan_cli/core/plugins/community.py +543 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/plugins/plugin_base.py +18 -2
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/plugins/plugin_registry.py +11 -4
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/models.py +1 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/workflow_registry.py +44 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/workflow_sources.py +28 -9
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/steps/ai_assistant_step.py +0 -1
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/steps/command_step.py +3 -6
- titan_cli-0.2.0/titan_cli/ui/tui/screens/install_plugin_screen.py +567 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/main_menu.py +25 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/plugin_config_wizard.py +33 -30
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/plugin_management.py +224 -16
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/workflow_execution.py +9 -8
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/__init__.py +4 -0
- titan_cli-0.2.0/titan_cli/ui/tui/widgets/wizard.py +49 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/LICENSE +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/README.md +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/git_client.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/network/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/network/git_network.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/branch_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/commit_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/diff_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/remote_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/stash_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/status_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/tag_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/clients/services/worktree_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/exceptions.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/messages.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/branch_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/commit_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/status_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/tag_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/mappers/worktree_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/branch.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/commit.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/status.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/tag.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/network/worktree.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/branch.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/commit.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/status.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/tag.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/models/view/worktree.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/operations/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/operations/branch_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/operations/commit_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/operations/diff_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/plugin.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/ai_commit_message_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/branch_steps.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/checkout_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/commit_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/create_branch_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/create_worktree_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/diff_summary_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/pull_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/push_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/remove_worktree_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/restore_original_branch_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/save_current_branch_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/status_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/steps/worktree_command_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/workflows/__previews__/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/workflows/__previews__/commit_ai_preview.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-git/titan_plugin_git/workflows/commit-ai.yaml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/agents/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/agents/config_loader.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/agents/issue_generator.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/agents/pr_agent.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/github_client.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/network/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/network/gh_network.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/network/graphql_network.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/network/graphql_queries.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/protocols.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/services/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/services/issue_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/services/pr_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/services/review_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/clients/services/team_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/config/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/config/pr_agent.toml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/exceptions.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/messages.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/formatting.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/comment_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/issue_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/pr_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/review_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/mappers/thread_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/graphql/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/graphql/issue_comment.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/graphql/review_comment.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/graphql/review_thread.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/graphql/user.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/rest/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/rest/issue.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/rest/pull_request.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/rest/review.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/network/rest/user.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/models/view.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/comment_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/issue_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/pr_creation_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/pr_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/operations/worktree_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/plugin.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/ai_pr_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/create_pr_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/github_prompt_steps.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/issue_steps.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/pr_review_steps.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/preview_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/steps/worktree_steps.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/utils.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/code_block.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/comment.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/comment_thread.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/comment_utils.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/widgets/reply_comment.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/workflows/__previews__/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/workflows/__previews__/create_pr_ai_preview.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/workflows/create-issue-ai.yaml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/workflows/create-pr-ai.yaml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-github/titan_plugin_github/workflows/review-pr-comments.yaml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/config_loader.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/jira_agent.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/prompts.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/response_parser.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/token_tracker.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/agents/validators.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/jira_client.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/network/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/network/jira_network.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/comment_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/issue_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/link_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/metadata_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/project_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/clients/services/transition_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/config/jira_agent.toml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/config/templates/issue_analysis.md.j2 +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/exceptions.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/formatters/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/formatters/markdown_formatter.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/messages.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/formatting.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/mappers/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/mappers/comment_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/mappers/issue_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/mappers/project_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/mappers/transition_mapper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/comment.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/issue.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/issue_type.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/priority.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/project.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/status.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/transition.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/network/rest/user.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/models/view.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/operations/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/operations/issue_formatting_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/operations/jql_operations.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/plugin.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/ai_analyze_issue_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/get_issue_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/list_versions_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/prompt_select_issue_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/search_jql_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/steps/search_saved_query_step.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/utils/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/utils/issue_sorter.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/utils/saved_queries.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/plugins/titan-plugin-jira/titan_plugin_jira/workflows/analyze-jira-issues.yaml +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/__main__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/agents/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/agents/base.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/client.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/constants.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/exceptions.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/llm_tools.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/models.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/oauth_helper.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/providers/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/providers/anthropic.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/providers/base.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ai/providers/gemini.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/cli.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/clients/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/clients/gcloud_client.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/config.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/discovery.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/errors.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/logging/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/logging/decorators.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/models.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/plugins/available.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/plugins/models.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/result.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/secrets.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/utils.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/project_step_source.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/workflow_exceptions.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/core/workflows/workflow_filter_service.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/builder.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/context.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/mock_context.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/results.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/utils/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/utils/venv.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/engine/workflow_executor.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/external_cli/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/external_cli/configs.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/external_cli/launcher.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/messages.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/__previews__/statusbar_preview.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/app.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/colors.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/icons.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/ai_config.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/ai_config_wizard.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/base.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/cli_launcher.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/global_setup_wizard.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/project_setup_wizard.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/screens/workflows.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/textual_components.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/textual_workflow_executor.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/theme.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/button.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/decision_badge.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/header.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/multiline_input.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/panel.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/panel_container.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/prompt_choice.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/prompt_input.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/prompt_option_list.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/prompt_selection_list.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/prompt_textarea.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/status_bar.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/step_container.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/styled_option_list.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/table.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/ui/tui/widgets/text.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/utils/__init__.py +0 -0
- {titan_cli-0.1.17 → titan_cli-0.2.0}/titan_cli/utils/autoupdate.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: titan-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Modular development tools orchestrator - Streamline your workflows with AI integration and intuitive terminal UI
|
|
5
|
-
Home-page: https://github.com/masorange/titan-cli
|
|
6
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
7
|
Keywords: cli,workflow,orchestrator,automation,devtools,ai
|
|
8
8
|
Author: MasOrange Apps Team
|
|
9
9
|
Author-email: apps-management-stores@masorange.es
|
|
@@ -17,6 +17,8 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
22
|
Requires-Dist: anthropic (>=0.75.0,<0.76.0)
|
|
21
23
|
Requires-Dist: google-auth (>=2.43.0,<3.0.0)
|
|
22
24
|
Requires-Dist: google-genai (>=1.58.0,<2.0.0)
|
|
@@ -32,7 +34,8 @@ Requires-Dist: textual (>=1.0.0,<2.0.0)
|
|
|
32
34
|
Requires-Dist: tomli (>=2.0.0,<3.0.0)
|
|
33
35
|
Requires-Dist: tomli-w (>=1.0.0,<2.0.0)
|
|
34
36
|
Requires-Dist: typer (>=0.20.0,<1.0.0)
|
|
35
|
-
Project-URL: Documentation, https://github.
|
|
37
|
+
Project-URL: Documentation, https://masorange.github.io/titan-cli/
|
|
38
|
+
Project-URL: Homepage, https://github.com/masorange/titan-cli
|
|
36
39
|
Project-URL: Repository, https://github.com/masorange/titan-cli
|
|
37
40
|
Description-Content-Type: text/markdown
|
|
38
41
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "titan-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "Modular development tools orchestrator - Streamline your workflows with AI integration and intuitive terminal UI"
|
|
5
5
|
authors = ["MasOrange Apps Team <apps-management-stores@masorange.es>"]
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
homepage = "https://github.com/masorange/titan-cli"
|
|
8
8
|
repository = "https://github.com/masorange/titan-cli"
|
|
9
|
-
documentation = "https://github.
|
|
9
|
+
documentation = "https://masorange.github.io/titan-cli/"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
keywords = ["cli", "workflow", "orchestrator", "automation", "devtools", "ai"]
|
|
12
12
|
classifiers = [
|
|
@@ -44,6 +44,13 @@ requests = ">=2.31.0,<3.0.0"
|
|
|
44
44
|
packaging = ">=23.0,<25.0"
|
|
45
45
|
structlog = ">=25.5.0,<26.0.0"
|
|
46
46
|
|
|
47
|
+
[tool.poetry.group.docs]
|
|
48
|
+
optional = true
|
|
49
|
+
|
|
50
|
+
[tool.poetry.group.docs.dependencies]
|
|
51
|
+
mkdocs = "^1.6"
|
|
52
|
+
mkdocs-material = "^9.5"
|
|
53
|
+
|
|
47
54
|
[tool.poetry.group.dev.dependencies]
|
|
48
55
|
pytest = "^8.0"
|
|
49
56
|
pytest-mock = "^3.12"
|
|
@@ -105,7 +105,12 @@ def _get_log_file_path(custom_path: Optional[Path] = None) -> Path:
|
|
|
105
105
|
|
|
106
106
|
# XDG Base Directory: logs go in ~/.local/state/
|
|
107
107
|
log_dir = Path.home() / ".local" / "state" / "titan" / "logs"
|
|
108
|
-
|
|
108
|
+
try:
|
|
109
|
+
log_dir.mkdir(parents=True, exist_ok=True)
|
|
110
|
+
except (PermissionError, OSError):
|
|
111
|
+
import tempfile
|
|
112
|
+
log_dir = Path(tempfile.gettempdir()) / "titan" / "logs"
|
|
113
|
+
log_dir.mkdir(parents=True, exist_ok=True)
|
|
109
114
|
|
|
110
115
|
return log_dir / "titan.log"
|
|
111
116
|
|
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Community Plugin Manager
|
|
3
|
+
|
|
4
|
+
Business logic for installing, tracking, and uninstalling community plugins
|
|
5
|
+
from user-provided git repositories.
|
|
6
|
+
|
|
7
|
+
Community plugins are tracked in ~/.titan/community_plugins.toml.
|
|
8
|
+
Installation always uses `pipx inject` to maintain isolation.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
import sys
|
|
13
|
+
import subprocess
|
|
14
|
+
from dataclasses import dataclass, asdict
|
|
15
|
+
from enum import StrEnum
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Optional
|
|
18
|
+
from urllib.error import HTTPError, URLError
|
|
19
|
+
from urllib.request import urlopen, Request
|
|
20
|
+
|
|
21
|
+
import tomli
|
|
22
|
+
import tomli_w
|
|
23
|
+
|
|
24
|
+
from titan_cli.core.logging import get_logger
|
|
25
|
+
|
|
26
|
+
logger = get_logger(__name__)
|
|
27
|
+
|
|
28
|
+
# ---------------------------------------------------------------------------
|
|
29
|
+
# Constants
|
|
30
|
+
# ---------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
COMMUNITY_PLUGINS_FILE = Path.home() / ".titan" / "community_plugins.toml"
|
|
33
|
+
|
|
34
|
+
# Raw pyproject.toml URL templates per host (use .format(path=..., version=...))
|
|
35
|
+
_RAW_URL_GITHUB = "https://raw.githubusercontent.com/{path}/{version}/pyproject.toml"
|
|
36
|
+
_RAW_URL_GITLAB = "https://gitlab.com/{path}/-/raw/{version}/pyproject.toml"
|
|
37
|
+
_RAW_URL_BITBUCKET = "https://bitbucket.org/{path}/raw/{version}/pyproject.toml"
|
|
38
|
+
|
|
39
|
+
# Base URL prefixes used to strip host when building the path fragment
|
|
40
|
+
_BASE_GITHUB = "https://github.com/"
|
|
41
|
+
_BASE_GITLAB = "https://gitlab.com/"
|
|
42
|
+
_BASE_BITBUCKET = "https://bitbucket.org/"
|
|
43
|
+
|
|
44
|
+
# pipx command
|
|
45
|
+
_PIPX_CMD = "pipx"
|
|
46
|
+
_TITAN_PACKAGE = "titan-cli"
|
|
47
|
+
|
|
48
|
+
# HTTP fetch timeout (seconds)
|
|
49
|
+
_FETCH_TIMEOUT = 10
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# ---------------------------------------------------------------------------
|
|
53
|
+
# Enums
|
|
54
|
+
# ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
class PluginHost(StrEnum):
|
|
57
|
+
"""Supported git hosting providers for community plugin preview."""
|
|
58
|
+
GITHUB = "github"
|
|
59
|
+
GITLAB = "gitlab"
|
|
60
|
+
BITBUCKET = "bitbucket"
|
|
61
|
+
UNKNOWN = "unknown"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# ---------------------------------------------------------------------------
|
|
65
|
+
# Data model
|
|
66
|
+
# ---------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
@dataclass
|
|
69
|
+
class CommunityPluginRecord:
|
|
70
|
+
"""Record of an installed community plugin."""
|
|
71
|
+
|
|
72
|
+
repo_url: str # Base URL without @version
|
|
73
|
+
version: str # Tag or commit SHA
|
|
74
|
+
package_name: str # Python package name from pyproject.toml
|
|
75
|
+
titan_plugin_name: str # Key registered under titan.plugins entry point
|
|
76
|
+
installed_at: str # ISO 8601 datetime
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# ---------------------------------------------------------------------------
|
|
80
|
+
# URL parsing and validation
|
|
81
|
+
# ---------------------------------------------------------------------------
|
|
82
|
+
|
|
83
|
+
def parse_repo_url(raw_url: str) -> tuple[str, str]:
|
|
84
|
+
"""
|
|
85
|
+
Split a URL+version string into (base_url, version).
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
raw_url: e.g. "https://github.com/user/plugin@v1.2.0"
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
Tuple of (base_url, version)
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
ValueError: if no @version suffix is present
|
|
95
|
+
"""
|
|
96
|
+
raw_url = raw_url.strip()
|
|
97
|
+
if "@" not in raw_url:
|
|
98
|
+
raise ValueError(
|
|
99
|
+
"No version specified. Include a version tag or commit SHA, "
|
|
100
|
+
"e.g. https://github.com/user/plugin@v1.0.0"
|
|
101
|
+
)
|
|
102
|
+
idx = raw_url.rfind("@")
|
|
103
|
+
base_url = raw_url[:idx]
|
|
104
|
+
version = raw_url[idx + 1:]
|
|
105
|
+
if not version:
|
|
106
|
+
raise ValueError(
|
|
107
|
+
"Version is empty. Include a version tag or commit SHA, "
|
|
108
|
+
"e.g. https://github.com/user/plugin@v1.0.0"
|
|
109
|
+
)
|
|
110
|
+
return base_url, version
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def validate_url(raw_url: str) -> None:
|
|
114
|
+
"""
|
|
115
|
+
Validate that raw_url is well-formed and includes a version.
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
ValueError: with a user-friendly message describing the problem
|
|
119
|
+
"""
|
|
120
|
+
raw_url = raw_url.strip()
|
|
121
|
+
if not raw_url:
|
|
122
|
+
raise ValueError("URL cannot be empty.")
|
|
123
|
+
if not raw_url.startswith("https://"):
|
|
124
|
+
raise ValueError("URL must start with https://")
|
|
125
|
+
base_url, _ = parse_repo_url(raw_url)
|
|
126
|
+
if not base_url.startswith("https://"):
|
|
127
|
+
raise ValueError("Repository URL must start with https://")
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# ---------------------------------------------------------------------------
|
|
131
|
+
# Host detection and raw URL building
|
|
132
|
+
# ---------------------------------------------------------------------------
|
|
133
|
+
|
|
134
|
+
def detect_host(base_url: str) -> PluginHost:
|
|
135
|
+
"""Detect the git hosting provider from the base URL."""
|
|
136
|
+
if _BASE_GITHUB in base_url:
|
|
137
|
+
return PluginHost.GITHUB
|
|
138
|
+
if _BASE_GITLAB in base_url:
|
|
139
|
+
return PluginHost.GITLAB
|
|
140
|
+
if _BASE_BITBUCKET in base_url:
|
|
141
|
+
return PluginHost.BITBUCKET
|
|
142
|
+
return PluginHost.UNKNOWN
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def build_raw_pyproject_url(base_url: str, version: str, host: PluginHost) -> Optional[str]:
|
|
146
|
+
"""
|
|
147
|
+
Build the raw URL to fetch pyproject.toml from a known hosting provider.
|
|
148
|
+
|
|
149
|
+
Returns None for unknown hosts.
|
|
150
|
+
"""
|
|
151
|
+
clean = base_url.rstrip("/").removesuffix(".git")
|
|
152
|
+
|
|
153
|
+
match host:
|
|
154
|
+
case PluginHost.GITHUB:
|
|
155
|
+
path = clean.removeprefix(_BASE_GITHUB)
|
|
156
|
+
return _RAW_URL_GITHUB.format(path=path, version=version)
|
|
157
|
+
case PluginHost.GITLAB:
|
|
158
|
+
path = clean.removeprefix(_BASE_GITLAB)
|
|
159
|
+
return _RAW_URL_GITLAB.format(path=path, version=version)
|
|
160
|
+
case PluginHost.BITBUCKET:
|
|
161
|
+
path = clean.removeprefix(_BASE_BITBUCKET)
|
|
162
|
+
return _RAW_URL_BITBUCKET.format(path=path, version=version)
|
|
163
|
+
case PluginHost.UNKNOWN:
|
|
164
|
+
return None
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
# ---------------------------------------------------------------------------
|
|
168
|
+
# pyproject.toml fetching and parsing
|
|
169
|
+
# ---------------------------------------------------------------------------
|
|
170
|
+
|
|
171
|
+
def get_github_token() -> Optional[str]:
|
|
172
|
+
"""
|
|
173
|
+
Try to get a GitHub token from the gh CLI.
|
|
174
|
+
|
|
175
|
+
Returns the token string, or None if gh is not installed or not authenticated.
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
result = subprocess.run(
|
|
179
|
+
["gh", "auth", "token"],
|
|
180
|
+
capture_output=True,
|
|
181
|
+
text=True,
|
|
182
|
+
timeout=5,
|
|
183
|
+
)
|
|
184
|
+
if result.returncode == 0:
|
|
185
|
+
token = result.stdout.strip()
|
|
186
|
+
return token if token else None
|
|
187
|
+
except (FileNotFoundError, subprocess.TimeoutExpired):
|
|
188
|
+
pass
|
|
189
|
+
return None
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def fetch_pyproject_toml(raw_url: str, token: Optional[str] = None) -> tuple[Optional[str], Optional[str]]:
|
|
193
|
+
"""
|
|
194
|
+
Fetch the pyproject.toml content from a raw URL.
|
|
195
|
+
|
|
196
|
+
Args:
|
|
197
|
+
raw_url: Direct URL to the raw pyproject.toml file.
|
|
198
|
+
token: Optional bearer token for private repositories.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
(content, error) — one of them will be None.
|
|
202
|
+
On success: (content_str, None)
|
|
203
|
+
On 404: (None, "not_found")
|
|
204
|
+
On network error:(None, "network_error")
|
|
205
|
+
"""
|
|
206
|
+
try:
|
|
207
|
+
req = Request(raw_url)
|
|
208
|
+
if token:
|
|
209
|
+
req.add_header("Authorization", f"token {token}")
|
|
210
|
+
with urlopen(req, timeout=_FETCH_TIMEOUT) as resp:
|
|
211
|
+
return resp.read().decode("utf-8"), None
|
|
212
|
+
except HTTPError as e:
|
|
213
|
+
if e.code == 404:
|
|
214
|
+
logger.warning("community_plugin_preview_not_found", url=raw_url, status=e.code)
|
|
215
|
+
return None, "not_found"
|
|
216
|
+
logger.warning("community_plugin_preview_http_error", url=raw_url, status=e.code)
|
|
217
|
+
return None, "network_error"
|
|
218
|
+
except (URLError, OSError) as e:
|
|
219
|
+
logger.warning("community_plugin_preview_network_error", url=raw_url, error=str(e))
|
|
220
|
+
return None, "network_error"
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def parse_plugin_metadata(toml_content: str) -> dict:
|
|
224
|
+
"""
|
|
225
|
+
Parse pyproject.toml content and extract plugin-relevant metadata.
|
|
226
|
+
|
|
227
|
+
Returns a dict with keys:
|
|
228
|
+
name, version, description, authors,
|
|
229
|
+
titan_entry_points (dict), python_deps (list), parse_error (bool)
|
|
230
|
+
"""
|
|
231
|
+
try:
|
|
232
|
+
data = tomli.loads(toml_content)
|
|
233
|
+
except Exception:
|
|
234
|
+
return {
|
|
235
|
+
"name": None, "version": None, "description": None,
|
|
236
|
+
"authors": [], "titan_entry_points": {}, "python_deps": [],
|
|
237
|
+
"parse_error": True,
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Support both [project] (PEP 621) and [tool.poetry] layouts
|
|
241
|
+
project = data.get("project", {})
|
|
242
|
+
poetry = data.get("tool", {}).get("poetry", {})
|
|
243
|
+
|
|
244
|
+
name = project.get("name") or poetry.get("name")
|
|
245
|
+
version = project.get("version") or poetry.get("version")
|
|
246
|
+
description = project.get("description") or poetry.get("description")
|
|
247
|
+
|
|
248
|
+
# Authors: PEP 621 → list of dicts; Poetry → list of strings
|
|
249
|
+
pep_authors = project.get("authors", [])
|
|
250
|
+
if pep_authors and isinstance(pep_authors[0], dict):
|
|
251
|
+
authors = [a.get("name", "") for a in pep_authors]
|
|
252
|
+
else:
|
|
253
|
+
authors = pep_authors or poetry.get("authors", [])
|
|
254
|
+
|
|
255
|
+
# Titan entry points
|
|
256
|
+
pep_eps = project.get("entry-points", {}).get("titan.plugins", {})
|
|
257
|
+
poetry_eps = poetry.get("plugins", {}).get("titan.plugins", {})
|
|
258
|
+
titan_entry_points = pep_eps or poetry_eps
|
|
259
|
+
|
|
260
|
+
# Dependency names (strip version specifiers)
|
|
261
|
+
pep_deps = project.get("dependencies", [])
|
|
262
|
+
poetry_deps = list(poetry.get("dependencies", {}).keys())
|
|
263
|
+
if pep_deps:
|
|
264
|
+
dep_names = []
|
|
265
|
+
for dep in pep_deps:
|
|
266
|
+
for sep in [">=", "<=", "!=", "~=", "==", ">"]:
|
|
267
|
+
dep = dep.split(sep)[0]
|
|
268
|
+
dep_names.append(dep.strip())
|
|
269
|
+
python_deps = dep_names
|
|
270
|
+
else:
|
|
271
|
+
python_deps = [d for d in poetry_deps if d.lower() != "python"]
|
|
272
|
+
|
|
273
|
+
return {
|
|
274
|
+
"name": name, "version": version, "description": description,
|
|
275
|
+
"authors": authors, "titan_entry_points": titan_entry_points,
|
|
276
|
+
"python_deps": python_deps, "parse_error": False,
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# ---------------------------------------------------------------------------
|
|
281
|
+
# pipx environment detection
|
|
282
|
+
# ---------------------------------------------------------------------------
|
|
283
|
+
|
|
284
|
+
def is_running_in_pipx() -> bool:
|
|
285
|
+
"""Detect whether Titan is currently running inside a pipx-managed venv."""
|
|
286
|
+
executable = sys.executable
|
|
287
|
+
if "pipx" in executable:
|
|
288
|
+
return True
|
|
289
|
+
if os.environ.get("PIPX_HOME"):
|
|
290
|
+
return True
|
|
291
|
+
pipx_default = Path.home() / ".local" / "pipx" / "venvs"
|
|
292
|
+
try:
|
|
293
|
+
Path(executable).relative_to(pipx_default)
|
|
294
|
+
return True
|
|
295
|
+
except ValueError:
|
|
296
|
+
pass
|
|
297
|
+
return False
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def is_running_in_poetry() -> bool:
|
|
301
|
+
"""Detect whether Titan is currently running inside a Poetry-managed venv."""
|
|
302
|
+
if os.environ.get("POETRY_ACTIVE"):
|
|
303
|
+
return True
|
|
304
|
+
executable = sys.executable
|
|
305
|
+
if ".venv" in executable:
|
|
306
|
+
return True
|
|
307
|
+
return False
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# ---------------------------------------------------------------------------
|
|
311
|
+
# pipx install / uninstall
|
|
312
|
+
# ---------------------------------------------------------------------------
|
|
313
|
+
|
|
314
|
+
def build_pipx_spec(base_url: str, version: str, token: Optional[str] = None) -> str:
|
|
315
|
+
"""
|
|
316
|
+
Build the pip/pipx package spec for a git repo URL.
|
|
317
|
+
|
|
318
|
+
e.g. git+https://github.com/user/plugin.git@v1.0.0
|
|
319
|
+
For private repos: git+https://<token>@github.com/user/plugin.git@v1.0.0
|
|
320
|
+
"""
|
|
321
|
+
clean = base_url.rstrip("/")
|
|
322
|
+
if not clean.endswith(".git"):
|
|
323
|
+
clean = clean + ".git"
|
|
324
|
+
if token:
|
|
325
|
+
clean = clean.replace("https://", f"https://{token}@", 1)
|
|
326
|
+
return f"git+{clean}@{version}"
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def install_community_plugin(base_url: str, version: str, token: Optional[str] = None) -> subprocess.CompletedProcess:
|
|
330
|
+
"""
|
|
331
|
+
Install a community plugin into the active Python environment.
|
|
332
|
+
|
|
333
|
+
- pipx environment → `pipx inject titan-cli <spec>`
|
|
334
|
+
- Poetry environment → `poetry run pip install <spec>`
|
|
335
|
+
|
|
336
|
+
Returns the CompletedProcess — caller must check returncode.
|
|
337
|
+
"""
|
|
338
|
+
spec = build_pipx_spec(base_url, version, token)
|
|
339
|
+
logger.info("community_plugin_install", base_url=base_url, version=version)
|
|
340
|
+
|
|
341
|
+
if is_running_in_pipx():
|
|
342
|
+
return subprocess.run(
|
|
343
|
+
[_PIPX_CMD, "inject", _TITAN_PACKAGE, spec],
|
|
344
|
+
capture_output=True,
|
|
345
|
+
text=True,
|
|
346
|
+
)
|
|
347
|
+
else:
|
|
348
|
+
return subprocess.run(
|
|
349
|
+
[sys.executable, "-m", "pip", "install", spec],
|
|
350
|
+
capture_output=True,
|
|
351
|
+
text=True,
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
def uninstall_community_plugin(package_name: str) -> subprocess.CompletedProcess:
|
|
356
|
+
"""
|
|
357
|
+
Uninstall a community plugin from the active Python environment.
|
|
358
|
+
|
|
359
|
+
- pipx environment → `pipx runpip titan-cli uninstall -y <package>`
|
|
360
|
+
- Poetry environment → `poetry run pip uninstall -y <package>`
|
|
361
|
+
|
|
362
|
+
Returns the CompletedProcess — caller must check returncode.
|
|
363
|
+
"""
|
|
364
|
+
logger.info("community_plugin_uninstall", package=package_name)
|
|
365
|
+
|
|
366
|
+
if is_running_in_pipx():
|
|
367
|
+
return subprocess.run(
|
|
368
|
+
[_PIPX_CMD, "runpip", _TITAN_PACKAGE, "uninstall", "-y", package_name],
|
|
369
|
+
capture_output=True,
|
|
370
|
+
text=True,
|
|
371
|
+
)
|
|
372
|
+
else:
|
|
373
|
+
return subprocess.run(
|
|
374
|
+
[sys.executable, "-m", "pip", "uninstall", "-y", package_name],
|
|
375
|
+
capture_output=True,
|
|
376
|
+
text=True,
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
# ---------------------------------------------------------------------------
|
|
381
|
+
# Community plugin tracking (~/.titan/community_plugins.toml)
|
|
382
|
+
# ---------------------------------------------------------------------------
|
|
383
|
+
|
|
384
|
+
def get_community_plugins_path() -> Path:
|
|
385
|
+
return COMMUNITY_PLUGINS_FILE
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
def load_community_plugins() -> list[CommunityPluginRecord]:
|
|
389
|
+
"""
|
|
390
|
+
Load installed community plugins from ~/.titan/community_plugins.toml.
|
|
391
|
+
|
|
392
|
+
Returns an empty list if the file does not exist.
|
|
393
|
+
"""
|
|
394
|
+
path = get_community_plugins_path()
|
|
395
|
+
if not path.exists():
|
|
396
|
+
return []
|
|
397
|
+
try:
|
|
398
|
+
with open(path, "rb") as f:
|
|
399
|
+
data = tomli.load(f)
|
|
400
|
+
return [CommunityPluginRecord(**item) for item in data.get("plugins", [])]
|
|
401
|
+
except Exception:
|
|
402
|
+
logger.exception("community_plugins_load_failed")
|
|
403
|
+
return []
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
def save_community_plugin(record: CommunityPluginRecord) -> None:
|
|
407
|
+
"""
|
|
408
|
+
Append a community plugin record to ~/.titan/community_plugins.toml.
|
|
409
|
+
Creates the file and parent directory if they don't exist.
|
|
410
|
+
"""
|
|
411
|
+
path = get_community_plugins_path()
|
|
412
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
413
|
+
|
|
414
|
+
if path.exists():
|
|
415
|
+
with open(path, "rb") as f:
|
|
416
|
+
data = tomli.load(f)
|
|
417
|
+
else:
|
|
418
|
+
data = {"plugins": []}
|
|
419
|
+
|
|
420
|
+
data.setdefault("plugins", [])
|
|
421
|
+
data["plugins"].append(asdict(record))
|
|
422
|
+
|
|
423
|
+
with open(path, "wb") as f:
|
|
424
|
+
tomli_w.dump(data, f)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def remove_community_plugin(package_name: str) -> None:
|
|
428
|
+
"""Remove a community plugin record by package name."""
|
|
429
|
+
path = get_community_plugins_path()
|
|
430
|
+
if not path.exists():
|
|
431
|
+
return
|
|
432
|
+
|
|
433
|
+
with open(path, "rb") as f:
|
|
434
|
+
data = tomli.load(f)
|
|
435
|
+
|
|
436
|
+
data["plugins"] = [
|
|
437
|
+
p for p in data.get("plugins", [])
|
|
438
|
+
if p.get("package_name") != package_name
|
|
439
|
+
]
|
|
440
|
+
|
|
441
|
+
with open(path, "wb") as f:
|
|
442
|
+
tomli_w.dump(data, f)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
def check_for_update(record: CommunityPluginRecord, token: Optional[str] = None) -> Optional[str]:
|
|
446
|
+
"""
|
|
447
|
+
Check if a newer version is available for a community plugin.
|
|
448
|
+
|
|
449
|
+
Queries the hosting provider's API for the latest release tag and compares
|
|
450
|
+
it with the installed version. Only works for GitHub, GitLab, Bitbucket with
|
|
451
|
+
tagged releases. Returns None if already up to date, unreachable, or using
|
|
452
|
+
a commit SHA as version.
|
|
453
|
+
|
|
454
|
+
Args:
|
|
455
|
+
record: The installed community plugin record.
|
|
456
|
+
token: Optional bearer token for private repositories.
|
|
457
|
+
|
|
458
|
+
Returns:
|
|
459
|
+
The latest version string if an update is available, None otherwise.
|
|
460
|
+
"""
|
|
461
|
+
host = detect_host(record.repo_url)
|
|
462
|
+
clean = record.repo_url.rstrip("/").removesuffix(".git")
|
|
463
|
+
|
|
464
|
+
try:
|
|
465
|
+
if host == PluginHost.GITHUB:
|
|
466
|
+
path = clean.removeprefix(_BASE_GITHUB)
|
|
467
|
+
api_url = f"https://api.github.com/repos/{path}/releases/latest"
|
|
468
|
+
req = Request(api_url)
|
|
469
|
+
req.add_header("Accept", "application/vnd.github+json")
|
|
470
|
+
if token:
|
|
471
|
+
req.add_header("Authorization", f"Bearer {token}")
|
|
472
|
+
with urlopen(req, timeout=_FETCH_TIMEOUT) as resp:
|
|
473
|
+
import json
|
|
474
|
+
data = json.loads(resp.read().decode("utf-8"))
|
|
475
|
+
latest = data.get("tag_name")
|
|
476
|
+
|
|
477
|
+
elif host == PluginHost.GITLAB:
|
|
478
|
+
path = clean.removeprefix(_BASE_GITLAB)
|
|
479
|
+
encoded = path.replace("/", "%2F")
|
|
480
|
+
api_url = f"https://gitlab.com/api/v4/projects/{encoded}/releases"
|
|
481
|
+
req = Request(api_url)
|
|
482
|
+
if token:
|
|
483
|
+
req.add_header("PRIVATE-TOKEN", token)
|
|
484
|
+
with urlopen(req, timeout=_FETCH_TIMEOUT) as resp:
|
|
485
|
+
import json
|
|
486
|
+
releases = json.loads(resp.read().decode("utf-8"))
|
|
487
|
+
latest = releases[0].get("tag_name") if releases else None
|
|
488
|
+
|
|
489
|
+
else:
|
|
490
|
+
return None
|
|
491
|
+
|
|
492
|
+
if not latest:
|
|
493
|
+
return None
|
|
494
|
+
|
|
495
|
+
# Only suggest update if latest is strictly newer than the recorded version
|
|
496
|
+
try:
|
|
497
|
+
from packaging.version import Version
|
|
498
|
+
if Version(latest.lstrip("v")) <= Version(record.version.lstrip("v")):
|
|
499
|
+
return None
|
|
500
|
+
except Exception:
|
|
501
|
+
# If version parsing fails, fall back to string equality check
|
|
502
|
+
if latest == record.version:
|
|
503
|
+
return None
|
|
504
|
+
|
|
505
|
+
return latest
|
|
506
|
+
|
|
507
|
+
except Exception:
|
|
508
|
+
return None
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
def check_for_updates(
|
|
512
|
+
records: list[CommunityPluginRecord],
|
|
513
|
+
token: Optional[str] = None,
|
|
514
|
+
) -> list[tuple[CommunityPluginRecord, str]]:
|
|
515
|
+
"""
|
|
516
|
+
Check for updates for a list of community plugin records.
|
|
517
|
+
|
|
518
|
+
Args:
|
|
519
|
+
records: Installed community plugin records to check.
|
|
520
|
+
token: Optional bearer token.
|
|
521
|
+
|
|
522
|
+
Returns:
|
|
523
|
+
List of (record, latest_version) tuples for plugins with available updates.
|
|
524
|
+
"""
|
|
525
|
+
updates = []
|
|
526
|
+
for record in records:
|
|
527
|
+
latest = check_for_update(record, token)
|
|
528
|
+
if latest:
|
|
529
|
+
updates.append((record, latest))
|
|
530
|
+
return updates
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def get_community_plugin_names() -> set[str]:
|
|
534
|
+
"""Return the set of titan_plugin_names for all installed community plugins."""
|
|
535
|
+
return {r.titan_plugin_name for r in load_community_plugins()}
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
def get_community_plugin_by_titan_name(titan_name: str) -> Optional[CommunityPluginRecord]:
|
|
539
|
+
"""Return the community plugin record for a given titan plugin name, or None."""
|
|
540
|
+
for record in load_community_plugins():
|
|
541
|
+
if record.titan_plugin_name == titan_name:
|
|
542
|
+
return record
|
|
543
|
+
return None
|
|
@@ -101,8 +101,24 @@ class TitanPlugin(ABC):
|
|
|
101
101
|
def workflows_path(self) -> Optional[Path]:
|
|
102
102
|
"""
|
|
103
103
|
Optional path to the directory containing workflow definitions for this plugin.
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
Returns:
|
|
106
106
|
Path to workflows directory or None if the plugin doesn't provide any.
|
|
107
107
|
"""
|
|
108
|
-
return None
|
|
108
|
+
return None
|
|
109
|
+
|
|
110
|
+
def filter_workflows(self, workflows: list, plugin_config: dict) -> list:
|
|
111
|
+
"""
|
|
112
|
+
Optional hook to filter this plugin's workflows based on its configuration.
|
|
113
|
+
|
|
114
|
+
Override to show/hide workflows according to the plugin's own config.
|
|
115
|
+
The default implementation returns all workflows unchanged.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
workflows: Workflows discovered for this plugin (list of WorkflowInfo).
|
|
119
|
+
plugin_config: The plugin's config dict from .titan/config.toml.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Filtered list of workflows to display.
|
|
123
|
+
"""
|
|
124
|
+
return workflows
|