moai-adk 0.25.4__py3-none-any.whl → 0.32.8__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.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +2 -5
- moai_adk/__main__.py +114 -82
- moai_adk/cli/__init__.py +6 -1
- moai_adk/cli/commands/__init__.py +1 -3
- moai_adk/cli/commands/analyze.py +5 -16
- moai_adk/cli/commands/doctor.py +6 -18
- moai_adk/cli/commands/init.py +56 -125
- moai_adk/cli/commands/language.py +14 -35
- moai_adk/cli/commands/status.py +9 -15
- moai_adk/cli/commands/update.py +1555 -190
- moai_adk/cli/prompts/init_prompts.py +112 -56
- moai_adk/cli/spec_status.py +263 -0
- moai_adk/cli/ui/__init__.py +44 -0
- moai_adk/cli/ui/progress.py +422 -0
- moai_adk/cli/ui/prompts.py +389 -0
- moai_adk/cli/ui/theme.py +129 -0
- moai_adk/cli/worktree/__init__.py +27 -0
- moai_adk/cli/worktree/__main__.py +31 -0
- moai_adk/cli/worktree/cli.py +672 -0
- moai_adk/cli/worktree/exceptions.py +89 -0
- moai_adk/cli/worktree/manager.py +490 -0
- moai_adk/cli/worktree/models.py +65 -0
- moai_adk/cli/worktree/registry.py +128 -0
- moai_adk/core/PHASE2_OPTIMIZATIONS.md +467 -0
- moai_adk/core/analysis/session_analyzer.py +17 -56
- moai_adk/core/claude_integration.py +26 -54
- moai_adk/core/command_helpers.py +10 -10
- moai_adk/core/comprehensive_monitoring_system.py +1183 -0
- moai_adk/core/config/auto_spec_config.py +5 -11
- moai_adk/core/config/migration.py +19 -9
- moai_adk/core/config/unified.py +436 -0
- moai_adk/core/context_manager.py +6 -12
- moai_adk/core/enterprise_features.py +1404 -0
- moai_adk/core/error_recovery_system.py +725 -112
- moai_adk/core/event_driven_hook_system.py +1371 -0
- moai_adk/core/git/__init__.py +8 -0
- moai_adk/core/git/branch_manager.py +3 -11
- moai_adk/core/git/checkpoint.py +1 -3
- moai_adk/core/git/conflict_detector.py +413 -0
- moai_adk/core/git/manager.py +91 -1
- moai_adk/core/hooks/post_tool_auto_spec_completion.py +56 -80
- moai_adk/core/input_validation_middleware.py +1006 -0
- moai_adk/core/integration/engine.py +6 -18
- moai_adk/core/integration/integration_tester.py +10 -9
- moai_adk/core/integration/utils.py +1 -1
- moai_adk/core/issue_creator.py +10 -28
- moai_adk/core/jit_context_loader.py +956 -0
- moai_adk/core/jit_enhanced_hook_manager.py +1987 -0
- moai_adk/core/language_config_resolver.py +485 -0
- moai_adk/core/language_validator.py +28 -41
- moai_adk/core/mcp/setup.py +15 -12
- moai_adk/core/merge/__init__.py +9 -0
- moai_adk/core/merge/analyzer.py +481 -0
- moai_adk/core/migration/alfred_to_moai_migrator.py +383 -0
- moai_adk/core/migration/backup_manager.py +78 -9
- moai_adk/core/migration/custom_element_scanner.py +358 -0
- moai_adk/core/migration/file_migrator.py +8 -17
- moai_adk/core/migration/interactive_checkbox_ui.py +488 -0
- moai_adk/core/migration/selective_restorer.py +470 -0
- moai_adk/core/migration/template_utils.py +74 -0
- moai_adk/core/migration/user_selection_ui.py +338 -0
- moai_adk/core/migration/version_detector.py +6 -10
- moai_adk/core/migration/version_migrator.py +3 -3
- moai_adk/core/performance/cache_system.py +8 -10
- moai_adk/core/phase_optimized_hook_scheduler.py +879 -0
- moai_adk/core/project/checker.py +2 -4
- moai_adk/core/project/detector.py +1 -3
- moai_adk/core/project/initializer.py +135 -23
- moai_adk/core/project/phase_executor.py +54 -81
- moai_adk/core/project/validator.py +6 -12
- moai_adk/core/quality/trust_checker.py +9 -27
- moai_adk/core/realtime_monitoring_dashboard.py +1724 -0
- moai_adk/core/robust_json_parser.py +611 -0
- moai_adk/core/rollback_manager.py +73 -148
- moai_adk/core/session_manager.py +10 -26
- moai_adk/core/skill_loading_system.py +579 -0
- moai_adk/core/spec/confidence_scoring.py +31 -100
- moai_adk/core/spec/ears_template_engine.py +351 -286
- moai_adk/core/spec/quality_validator.py +35 -69
- moai_adk/core/spec_status_manager.py +64 -74
- moai_adk/core/template/backup.py +45 -20
- moai_adk/core/template/config.py +112 -39
- moai_adk/core/template/merger.py +11 -19
- moai_adk/core/template/processor.py +253 -149
- moai_adk/core/template_engine.py +73 -40
- moai_adk/core/template_variable_synchronizer.py +417 -0
- moai_adk/core/unified_permission_manager.py +745 -0
- moai_adk/core/user_behavior_analytics.py +851 -0
- moai_adk/core/version_sync.py +429 -0
- moai_adk/foundation/__init__.py +56 -0
- moai_adk/foundation/backend.py +1027 -0
- moai_adk/foundation/database.py +1115 -0
- moai_adk/foundation/devops.py +1585 -0
- moai_adk/foundation/ears.py +431 -0
- moai_adk/foundation/frontend.py +870 -0
- moai_adk/foundation/git/commit_templates.py +4 -12
- moai_adk/foundation/git.py +376 -0
- moai_adk/foundation/langs.py +484 -0
- moai_adk/foundation/ml_ops.py +1162 -0
- moai_adk/foundation/testing.py +1524 -0
- moai_adk/foundation/trust/trust_principles.py +23 -72
- moai_adk/foundation/trust/validation_checklist.py +57 -162
- moai_adk/project/__init__.py +0 -0
- moai_adk/project/configuration.py +1084 -0
- moai_adk/project/documentation.py +566 -0
- moai_adk/project/schema.py +447 -0
- moai_adk/statusline/alfred_detector.py +1 -3
- moai_adk/statusline/config.py +13 -4
- moai_adk/statusline/enhanced_output_style_detector.py +23 -15
- moai_adk/statusline/main.py +51 -15
- moai_adk/statusline/renderer.py +104 -48
- moai_adk/statusline/update_checker.py +3 -9
- moai_adk/statusline/version_reader.py +140 -46
- moai_adk/templates/.claude/agents/moai/ai-nano-banana.md +549 -0
- moai_adk/templates/.claude/agents/moai/builder-agent.md +445 -0
- moai_adk/templates/.claude/agents/moai/builder-command.md +1132 -0
- moai_adk/templates/.claude/agents/moai/builder-skill.md +601 -0
- moai_adk/templates/.claude/agents/moai/expert-backend.md +831 -0
- moai_adk/templates/.claude/agents/moai/expert-database.md +774 -0
- moai_adk/templates/.claude/agents/moai/expert-debug.md +396 -0
- moai_adk/templates/.claude/agents/moai/expert-devops.md +711 -0
- moai_adk/templates/.claude/agents/moai/expert-frontend.md +666 -0
- moai_adk/templates/.claude/agents/moai/expert-security.md +474 -0
- moai_adk/templates/.claude/agents/moai/expert-uiux.md +1038 -0
- moai_adk/templates/.claude/agents/moai/manager-claude-code.md +429 -0
- moai_adk/templates/.claude/agents/moai/manager-docs.md +570 -0
- moai_adk/templates/.claude/agents/moai/manager-git.md +937 -0
- moai_adk/templates/.claude/agents/moai/manager-project.md +891 -0
- moai_adk/templates/.claude/agents/moai/manager-quality.md +598 -0
- moai_adk/templates/.claude/agents/moai/manager-spec.md +713 -0
- moai_adk/templates/.claude/agents/moai/manager-strategy.md +600 -0
- moai_adk/templates/.claude/agents/moai/manager-tdd.md +603 -0
- moai_adk/templates/.claude/agents/moai/mcp-context7.md +369 -0
- moai_adk/templates/.claude/agents/moai/mcp-figma.md +1567 -0
- moai_adk/templates/.claude/agents/moai/mcp-notion.md +749 -0
- moai_adk/templates/.claude/agents/moai/mcp-playwright.md +427 -0
- moai_adk/templates/.claude/agents/moai/mcp-sequential-thinking.md +994 -0
- moai_adk/templates/.claude/commands/moai/0-project.md +1143 -0
- moai_adk/templates/.claude/commands/moai/1-plan.md +1435 -0
- moai_adk/templates/.claude/commands/moai/2-run.md +883 -0
- moai_adk/templates/.claude/commands/moai/3-sync.md +993 -0
- moai_adk/templates/.claude/commands/moai/9-feedback.md +314 -0
- moai_adk/templates/.claude/hooks/__init__.py +8 -0
- moai_adk/templates/.claude/hooks/moai/__init__.py +8 -0
- moai_adk/templates/.claude/hooks/moai/lib/__init__.py +85 -0
- moai_adk/templates/.claude/hooks/moai/lib/checkpoint.py +244 -0
- moai_adk/templates/.claude/hooks/moai/lib/common.py +131 -0
- moai_adk/templates/.claude/hooks/moai/lib/config_manager.py +446 -0
- moai_adk/templates/.claude/hooks/moai/lib/config_validator.py +639 -0
- moai_adk/templates/.claude/hooks/moai/lib/example_config.json +104 -0
- moai_adk/templates/.claude/hooks/moai/lib/git_operations_manager.py +590 -0
- moai_adk/templates/.claude/hooks/moai/lib/language_validator.py +317 -0
- moai_adk/templates/.claude/hooks/moai/lib/models.py +102 -0
- moai_adk/templates/.claude/hooks/moai/lib/path_utils.py +28 -0
- moai_adk/templates/.claude/hooks/moai/lib/project.py +768 -0
- moai_adk/templates/.claude/hooks/moai/lib/test_hooks_improvements.py +443 -0
- moai_adk/templates/.claude/hooks/moai/lib/timeout.py +160 -0
- moai_adk/templates/.claude/hooks/moai/lib/unified_timeout_manager.py +530 -0
- moai_adk/templates/.claude/hooks/moai/session_end__auto_cleanup.py +862 -0
- moai_adk/templates/.claude/hooks/moai/session_start__show_project_info.py +921 -0
- moai_adk/templates/.claude/output-styles/moai/r2d2.md +380 -0
- moai_adk/templates/.claude/output-styles/moai/yoda.md +338 -0
- moai_adk/templates/.claude/settings.json +172 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/SKILL.md +247 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/README.md +44 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/api-documentation.md +130 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/code-documentation.md +152 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/multi-format-output.md +178 -0
- moai_adk/templates/.claude/skills/moai-docs-generation/modules/user-guides.md +147 -0
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +319 -0
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +320 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/README.md +53 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/mongodb.md +231 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/postgresql.md +169 -0
- moai_adk/templates/.claude/skills/moai-domain-database/modules/redis.md +262 -0
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +496 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/SKILL.md +453 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/examples.md +560 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/accessibility-wcag.md +260 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/component-architecture.md +228 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/design-system-tokens.md +405 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/icon-libraries.md +401 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/modules/theming-system.md +373 -0
- moai_adk/templates/.claude/skills/moai-domain-uiux/reference.md +243 -0
- moai_adk/templates/.claude/skills/moai-formats-data/SKILL.md +491 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/README.md +98 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/SKILL-MODULARIZATION-TEMPLATE.md +278 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/caching-performance.md +459 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/data-validation.md +485 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/json-optimization.md +374 -0
- moai_adk/templates/.claude/skills/moai-formats-data/modules/toon-encoding.md +308 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/SKILL.md +201 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/best-practices-checklist.md +616 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-custom-slash-commands-official.md +729 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-hooks-official.md +560 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-iam-official.md +635 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-memory-official.md +543 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-settings-official.md +663 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-skills-official.md +113 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/claude-code-sub-agents-official.md +238 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/complete-configuration-guide.md +175 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-examples.md +1674 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/skill-formatting-guide.md +729 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-examples.md +1513 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-formatting-guide.md +1086 -0
- moai_adk/templates/.claude/skills/moai-foundation-claude/reference/sub-agents/sub-agent-integration-patterns.md +1100 -0
- moai_adk/templates/.claude/skills/moai-foundation-context/SKILL.md +438 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/SKILL.md +515 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/README.md +296 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/agents-reference.md +346 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/commands-reference.md +432 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/delegation-patterns.md +757 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/execution-rules.md +687 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/modular-system.md +665 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/progressive-disclosure.md +649 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/spec-first-tdd.md +864 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/token-optimization.md +708 -0
- moai_adk/templates/.claude/skills/moai-foundation-core/modules/trust-5-framework.md +981 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/SKILL.md +362 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/examples.md +1232 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/best-practices.md +261 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/integration-patterns.md +194 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/proactive-analysis.md +229 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/modules/trust5-validation.md +169 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/reference.md +1266 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/scripts/quality-gate.sh +668 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/templates/github-actions-quality.yml +481 -0
- moai_adk/templates/.claude/skills/moai-foundation-quality/templates/quality-config.yaml +519 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/SKILL.md +352 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/README.md +52 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/error-handling.md +334 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/integration-patterns.md +310 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/security-authentication.md +256 -0
- moai_adk/templates/.claude/skills/moai-integration-mcp/modules/server-architecture.md +253 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/README.md +133 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/SKILL.md +296 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/examples.md +1269 -0
- moai_adk/templates/.claude/skills/moai-lang-unified/reference.md +331 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/SKILL.md +298 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/advanced-patterns.md +465 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/examples.md +270 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/optimization.md +440 -0
- moai_adk/templates/.claude/skills/moai-library-mermaid/reference.md +228 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/SKILL.md +316 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/advanced-patterns.md +336 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-deployment-patterns.md +182 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/advanced-patterns.md +17 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/configuration.md +57 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/content-architecture-optimization.md +162 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/deployment.md +52 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/framework-core-configuration.md +186 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/i18n-setup.md +55 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/modules/mdx-components.md +52 -0
- moai_adk/templates/.claude/skills/moai-library-nextra/optimization.md +303 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/SKILL.md +370 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/examples.md +575 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/advanced-patterns.md +394 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/optimization.md +278 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-components.md +457 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/modules/shadcn-theming.md +373 -0
- moai_adk/templates/.claude/skills/moai-library-shadcn/reference.md +74 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/README.md +186 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/SKILL.md +290 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/examples.md +1225 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/reference.md +567 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/scripts/provider-selector.py +323 -0
- moai_adk/templates/.claude/skills/moai-platform-baas/templates/stack-config.yaml +204 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/SKILL.md +446 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/advanced-patterns.md +379 -0
- moai_adk/templates/.claude/skills/moai-workflow-jit-docs/optimization.md +286 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/README.md +190 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/SKILL.md +387 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/__init__.py +520 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/complete_workflow_demo_fixed.py +574 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_project_setup.py +317 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/complete_workflow_demo.py +663 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/config-migration-example.json +190 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/question-examples.json +135 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/examples/quick_start.py +196 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/__init__.py +17 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/advanced-patterns.md +158 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/ask_user_integration.py +340 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/batch_questions.py +713 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/config_manager.py +538 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/documentation_manager.py +1336 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/language_initializer.py +730 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/migration_manager.py +608 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/modules/template_optimizer.py +1005 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/config-schema.json +316 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/schemas/tab_schema.json +1362 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/config-template.json +71 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/product-template.md +44 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/structure-template.md +48 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/doc-templates/tech-template.md +71 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/config-manager-setup.json +109 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/language-initializer.json +228 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/menu-project-config.json +130 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/project-batch-questions.json +97 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/templates/question-templates/spec-workflow-setup.json +150 -0
- moai_adk/templates/.claude/skills/moai-workflow-project/test_integration_simple.py +436 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/SKILL.md +374 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/code-templates.md +124 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/feedback-templates.md +100 -0
- moai_adk/templates/.claude/skills/moai-workflow-templates/modules/template-optimizer.md +138 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/LICENSE.txt +202 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/SKILL.md +453 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/advanced-patterns.md +576 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/ai-powered-testing.py +294 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/console_logging.py +35 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/element_discovery.py +40 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/examples/static_html_automation.py +34 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/README.md +220 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/ai-debugging.md +845 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/automated-code-review.md +1416 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/performance-optimization.md +1234 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/smart-refactoring.md +1243 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/modules/tdd-context7.md +1260 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/optimization.md +505 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/reference/playwright-best-practices.md +57 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/scripts/with_server.py +218 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/templates/alfred-integration.md +376 -0
- moai_adk/templates/.claude/skills/moai-workflow-testing/workflows/enterprise-testing-workflow.py +571 -0
- moai_adk/templates/.claude/skills/moai-worktree/SKILL.md +410 -0
- moai_adk/templates/.claude/skills/moai-worktree/examples.md +606 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/integration-patterns.md +982 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/parallel-development.md +778 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-commands.md +646 -0
- moai_adk/templates/.claude/skills/moai-worktree/modules/worktree-management.md +782 -0
- moai_adk/templates/.claude/skills/moai-worktree/reference.md +357 -0
- moai_adk/templates/.git-hooks/pre-commit +103 -41
- moai_adk/templates/.git-hooks/pre-push +116 -21
- moai_adk/templates/.github/workflows/ci-universal.yml +513 -0
- moai_adk/templates/.github/workflows/security-secrets-check.yml +179 -0
- moai_adk/templates/.gitignore +184 -44
- moai_adk/templates/.mcp.json +7 -9
- moai_adk/templates/.moai/cache/personalization.json +10 -0
- moai_adk/templates/.moai/config/config.yaml +344 -0
- moai_adk/templates/.moai/config/presets/manual.yaml +28 -0
- moai_adk/templates/.moai/config/presets/personal.yaml +30 -0
- moai_adk/templates/.moai/config/presets/team.yaml +33 -0
- moai_adk/templates/.moai/config/questions/_schema.yaml +79 -0
- moai_adk/templates/.moai/config/questions/tab1-user.yaml +108 -0
- moai_adk/templates/.moai/config/questions/tab2-project.yaml +122 -0
- moai_adk/templates/.moai/config/questions/tab3-git.yaml +542 -0
- moai_adk/templates/.moai/config/questions/tab4-quality.yaml +167 -0
- moai_adk/templates/.moai/config/questions/tab5-system.yaml +152 -0
- moai_adk/templates/.moai/config/sections/git-strategy.yaml +40 -0
- moai_adk/templates/.moai/config/sections/language.yaml +11 -0
- moai_adk/templates/.moai/config/sections/project.yaml +13 -0
- moai_adk/templates/.moai/config/sections/quality.yaml +15 -0
- moai_adk/templates/.moai/config/sections/system.yaml +14 -0
- moai_adk/templates/.moai/config/sections/user.yaml +5 -0
- moai_adk/templates/.moai/config/statusline-config.yaml +86 -0
- moai_adk/templates/.moai/scripts/setup-glm.py +136 -0
- moai_adk/templates/CLAUDE.md +382 -501
- moai_adk/utils/__init__.py +24 -1
- moai_adk/utils/banner.py +7 -10
- moai_adk/utils/common.py +16 -30
- moai_adk/utils/link_validator.py +4 -12
- moai_adk/utils/safe_file_reader.py +2 -6
- moai_adk/utils/timeout.py +160 -0
- moai_adk/utils/toon_utils.py +256 -0
- moai_adk/version.py +22 -0
- moai_adk-0.32.8.dist-info/METADATA +2478 -0
- moai_adk-0.32.8.dist-info/RECORD +396 -0
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/WHEEL +1 -1
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/entry_points.txt +1 -0
- moai_adk/cli/commands/backup.py +0 -82
- moai_adk/cli/commands/improve_user_experience.py +0 -348
- moai_adk/cli/commands/migrate.py +0 -158
- moai_adk/cli/commands/validate_links.py +0 -118
- moai_adk/templates/.github/workflows/moai-gitflow.yml +0 -413
- moai_adk/templates/.github/workflows/moai-release-create.yml +0 -100
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +0 -188
- moai_adk/utils/user_experience.py +0 -531
- moai_adk-0.25.4.dist-info/METADATA +0 -2279
- moai_adk-0.25.4.dist-info/RECORD +0 -112
- {moai_adk-0.25.4.dist-info → moai_adk-0.32.8.dist-info}/licenses/LICENSE +0 -0
moai_adk/statusline/main.py
CHANGED
|
@@ -32,11 +32,22 @@ def read_session_context() -> dict:
|
|
|
32
32
|
Dictionary containing session information
|
|
33
33
|
"""
|
|
34
34
|
try:
|
|
35
|
-
|
|
35
|
+
# Handle Docker/non-interactive environments by checking TTY
|
|
36
|
+
input_data = sys.stdin.read() if not sys.stdin.isatty() else "{}"
|
|
36
37
|
if input_data:
|
|
37
|
-
|
|
38
|
+
try:
|
|
39
|
+
return json.loads(input_data)
|
|
40
|
+
except json.JSONDecodeError as e:
|
|
41
|
+
import logging
|
|
42
|
+
|
|
43
|
+
logging.error(f"Failed to parse JSON from stdin: {e}")
|
|
44
|
+
logging.debug(f"Input data: {input_data[:200]}")
|
|
45
|
+
return {}
|
|
38
46
|
return {}
|
|
39
|
-
except (
|
|
47
|
+
except (EOFError, ValueError) as e:
|
|
48
|
+
import logging
|
|
49
|
+
|
|
50
|
+
logging.error(f"Error reading stdin: {e}")
|
|
40
51
|
return {}
|
|
41
52
|
|
|
42
53
|
|
|
@@ -55,7 +66,8 @@ def safe_collect_git_info() -> tuple[str, str]:
|
|
|
55
66
|
git_status = f"+{git_info.staged} M{git_info.modified} ?{git_info.untracked}"
|
|
56
67
|
|
|
57
68
|
return branch, git_status
|
|
58
|
-
except
|
|
69
|
+
except (OSError, AttributeError, RuntimeError):
|
|
70
|
+
# Git collector errors (file access, attribute, or runtime errors)
|
|
59
71
|
return "N/A", ""
|
|
60
72
|
|
|
61
73
|
|
|
@@ -69,7 +81,8 @@ def safe_collect_duration() -> str:
|
|
|
69
81
|
try:
|
|
70
82
|
tracker = MetricsTracker()
|
|
71
83
|
return tracker.get_duration()
|
|
72
|
-
except
|
|
84
|
+
except (OSError, AttributeError, ValueError):
|
|
85
|
+
# Metrics tracker errors (file access, attribute, or value errors)
|
|
73
86
|
return "0m"
|
|
74
87
|
|
|
75
88
|
|
|
@@ -88,7 +101,8 @@ def safe_collect_alfred_task() -> str:
|
|
|
88
101
|
stage_suffix = f"-{task.stage}" if task.stage else ""
|
|
89
102
|
return f"[{task.command.upper()}{stage_suffix}]"
|
|
90
103
|
return ""
|
|
91
|
-
except
|
|
104
|
+
except (OSError, AttributeError, RuntimeError):
|
|
105
|
+
# Alfred detector errors (file access, attribute, or runtime errors)
|
|
92
106
|
return ""
|
|
93
107
|
|
|
94
108
|
|
|
@@ -103,7 +117,8 @@ def safe_collect_version() -> str:
|
|
|
103
117
|
reader = VersionReader()
|
|
104
118
|
version = reader.get_version()
|
|
105
119
|
return version or "unknown"
|
|
106
|
-
except
|
|
120
|
+
except (ImportError, AttributeError, OSError):
|
|
121
|
+
# Version reader errors (import, attribute, or file access errors)
|
|
107
122
|
return "unknown"
|
|
108
123
|
|
|
109
124
|
|
|
@@ -125,7 +140,8 @@ def safe_check_update(current_version: str) -> tuple[bool, Optional[str]]:
|
|
|
125
140
|
update_info = checker.check_for_update(current_version)
|
|
126
141
|
|
|
127
142
|
return update_info.available, update_info.latest_version
|
|
128
|
-
except
|
|
143
|
+
except (OSError, AttributeError, RuntimeError, ValueError):
|
|
144
|
+
# Update checker errors (file access, attribute, runtime, or value errors)
|
|
129
145
|
return False, None
|
|
130
146
|
|
|
131
147
|
|
|
@@ -134,26 +150,29 @@ def build_statusline_data(session_context: dict, mode: str = "compact") -> str:
|
|
|
134
150
|
Build complete statusline string from all data sources.
|
|
135
151
|
|
|
136
152
|
Collects information from:
|
|
137
|
-
- Claude Code session context
|
|
153
|
+
- Claude Code session context (via stdin)
|
|
138
154
|
- Git repository
|
|
139
155
|
- Session metrics
|
|
140
156
|
- Alfred workflow state
|
|
141
157
|
- MoAI-ADK version
|
|
142
158
|
- Update checker
|
|
159
|
+
- Output style
|
|
143
160
|
|
|
144
161
|
Args:
|
|
145
|
-
session_context: Context passed from Claude Code
|
|
162
|
+
session_context: Context passed from Claude Code via stdin
|
|
146
163
|
mode: Display mode (compact, extended, minimal)
|
|
147
164
|
|
|
148
165
|
Returns:
|
|
149
166
|
Rendered statusline string
|
|
150
167
|
"""
|
|
151
168
|
try:
|
|
152
|
-
# Extract model from session context
|
|
169
|
+
# Extract model from session context with Claude Code version
|
|
153
170
|
model_info = session_context.get("model", {})
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
model_name = model_info.get("display_name") or model_info.get("name") or "Unknown"
|
|
172
|
+
|
|
173
|
+
# Extract Claude Code version separately for new layout
|
|
174
|
+
claude_version = session_context.get("version", "")
|
|
175
|
+
model = model_name
|
|
157
176
|
|
|
158
177
|
# Extract directory
|
|
159
178
|
cwd = session_context.get("cwd", "")
|
|
@@ -162,7 +181,10 @@ def build_statusline_data(session_context: dict, mode: str = "compact") -> str:
|
|
|
162
181
|
else:
|
|
163
182
|
directory = "project"
|
|
164
183
|
|
|
165
|
-
#
|
|
184
|
+
# Extract output style from session context
|
|
185
|
+
output_style = session_context.get("output_style", {}).get("name", "")
|
|
186
|
+
|
|
187
|
+
# Collect all information from local sources
|
|
166
188
|
branch, git_status = safe_collect_git_info()
|
|
167
189
|
duration = safe_collect_duration()
|
|
168
190
|
active_task = safe_collect_alfred_task()
|
|
@@ -172,6 +194,7 @@ def build_statusline_data(session_context: dict, mode: str = "compact") -> str:
|
|
|
172
194
|
# Build StatuslineData with dynamic fields
|
|
173
195
|
data = StatuslineData(
|
|
174
196
|
model=model,
|
|
197
|
+
claude_version=claude_version,
|
|
175
198
|
version=version,
|
|
176
199
|
memory_usage="256MB", # TODO: Get actual memory usage
|
|
177
200
|
branch=branch,
|
|
@@ -179,6 +202,7 @@ def build_statusline_data(session_context: dict, mode: str = "compact") -> str:
|
|
|
179
202
|
duration=duration,
|
|
180
203
|
directory=directory,
|
|
181
204
|
active_task=active_task,
|
|
205
|
+
output_style=output_style,
|
|
182
206
|
update_available=update_available,
|
|
183
207
|
latest_version=latest_version,
|
|
184
208
|
)
|
|
@@ -204,9 +228,17 @@ def main():
|
|
|
204
228
|
Reads JSON from stdin, processes all information,
|
|
205
229
|
and outputs the formatted statusline string.
|
|
206
230
|
"""
|
|
231
|
+
# Debug mode check
|
|
232
|
+
debug_mode = os.environ.get("MOAI_STATUSLINE_DEBUG") == "1"
|
|
233
|
+
|
|
207
234
|
# Read session context from Claude Code
|
|
208
235
|
session_context = read_session_context()
|
|
209
236
|
|
|
237
|
+
if debug_mode:
|
|
238
|
+
# Write debug info to stderr for troubleshooting
|
|
239
|
+
sys.stderr.write(f"[DEBUG] Received session_context: {json.dumps(session_context, indent=2)}\n")
|
|
240
|
+
sys.stderr.flush()
|
|
241
|
+
|
|
210
242
|
# Load configuration
|
|
211
243
|
config = StatuslineConfig()
|
|
212
244
|
|
|
@@ -220,6 +252,10 @@ def main():
|
|
|
220
252
|
|
|
221
253
|
# Build and output statusline
|
|
222
254
|
statusline = build_statusline_data(session_context, mode=mode)
|
|
255
|
+
if debug_mode:
|
|
256
|
+
sys.stderr.write(f"[DEBUG] Generated statusline: {statusline}\n")
|
|
257
|
+
sys.stderr.flush()
|
|
258
|
+
|
|
223
259
|
if statusline:
|
|
224
260
|
print(statusline, end="")
|
|
225
261
|
|
moai_adk/statusline/renderer.py
CHANGED
|
@@ -23,6 +23,8 @@ class StatuslineData:
|
|
|
23
23
|
duration: str
|
|
24
24
|
directory: str
|
|
25
25
|
active_task: str
|
|
26
|
+
claude_version: str = "" # Claude Code version (e.g., "2.0.46")
|
|
27
|
+
output_style: str = "" # Output style name (e.g., "R2-D2", "Yoda")
|
|
26
28
|
update_available: bool = False
|
|
27
29
|
latest_version: str = ""
|
|
28
30
|
|
|
@@ -86,7 +88,7 @@ class StatuslineRenderer:
|
|
|
86
88
|
def _build_compact_parts(self, data: StatuslineData) -> List[str]:
|
|
87
89
|
"""
|
|
88
90
|
Build parts list for compact mode with labeled sections
|
|
89
|
-
Format: 🤖 Model | 🗿 Version |
|
|
91
|
+
New Format: 🤖 Model | 🔅 Claude Code Version | 🗿 MoAI Version | 💬 Style | 📊 Changes | 🔀 Branch
|
|
90
92
|
|
|
91
93
|
Args:
|
|
92
94
|
data: StatuslineData instance
|
|
@@ -100,9 +102,20 @@ class StatuslineRenderer:
|
|
|
100
102
|
if self._display_config.model:
|
|
101
103
|
parts.append(f"🤖 {data.model}")
|
|
102
104
|
|
|
103
|
-
# Add version if
|
|
105
|
+
# Add Claude Code version if available
|
|
106
|
+
if data.claude_version:
|
|
107
|
+
claude_ver_str = data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
108
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
109
|
+
|
|
110
|
+
# Add MoAI version if display enabled (system status)
|
|
104
111
|
if self._display_config.version:
|
|
105
|
-
|
|
112
|
+
# Add 'v' prefix if not already present
|
|
113
|
+
version_str = data.version if data.version.startswith("v") else f"v{data.version}"
|
|
114
|
+
parts.append(f"🗿 {version_str}")
|
|
115
|
+
|
|
116
|
+
# Add output style if not empty
|
|
117
|
+
if data.output_style:
|
|
118
|
+
parts.append(f"💬 {data.output_style}")
|
|
106
119
|
|
|
107
120
|
# Add git status if display enabled and status not empty
|
|
108
121
|
if self._display_config.git_status and data.git_status:
|
|
@@ -121,7 +134,7 @@ class StatuslineRenderer:
|
|
|
121
134
|
def _fit_to_constraint(self, data: StatuslineData, max_length: int) -> str:
|
|
122
135
|
"""
|
|
123
136
|
Fit statusline to character constraint by truncating
|
|
124
|
-
Format: 🤖 Model | 🗿 Version |
|
|
137
|
+
New Format: 🤖 Model | 🔅 Claude Code Version | 🗿 MoAI Version | 💬 Style | 📊 Changes | 🔀 Branch
|
|
125
138
|
|
|
126
139
|
Args:
|
|
127
140
|
data: StatuslineData instance
|
|
@@ -131,11 +144,21 @@ class StatuslineRenderer:
|
|
|
131
144
|
Truncated statusline string
|
|
132
145
|
"""
|
|
133
146
|
# Try with truncated branch first
|
|
134
|
-
truncated_branch = self._truncate_branch(data.branch, max_length=
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
truncated_branch = self._truncate_branch(data.branch, max_length=30)
|
|
148
|
+
version_str = data.version if data.version.startswith("v") else f"v{data.version}"
|
|
149
|
+
|
|
150
|
+
parts = [f"🤖 {data.model}"]
|
|
151
|
+
|
|
152
|
+
# Add Claude Code version if available
|
|
153
|
+
if data.claude_version:
|
|
154
|
+
claude_ver_str = data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
155
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
156
|
+
|
|
157
|
+
parts.append(f"🗿 {version_str}")
|
|
158
|
+
|
|
159
|
+
# Add output style if not empty
|
|
160
|
+
if data.output_style:
|
|
161
|
+
parts.append(f"💬 {data.output_style}")
|
|
139
162
|
|
|
140
163
|
# Add git status if display enabled and status not empty
|
|
141
164
|
if self._display_config.git_status and data.git_status:
|
|
@@ -153,23 +176,37 @@ class StatuslineRenderer:
|
|
|
153
176
|
# If still too long, try more aggressive branch truncation
|
|
154
177
|
if len(result) > max_length:
|
|
155
178
|
truncated_branch = self._truncate_branch(data.branch, max_length=12)
|
|
156
|
-
parts = [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
179
|
+
parts = [f"🤖 {data.model}"]
|
|
180
|
+
|
|
181
|
+
if data.claude_version:
|
|
182
|
+
claude_ver_str = (
|
|
183
|
+
data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
184
|
+
)
|
|
185
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
186
|
+
|
|
187
|
+
parts.append(f"🗿 {version_str}")
|
|
188
|
+
|
|
160
189
|
if data.git_status:
|
|
161
190
|
parts.append(f"📊 {data.git_status}")
|
|
191
|
+
if data.output_style:
|
|
192
|
+
parts.append(f"💬 {data.output_style}")
|
|
162
193
|
parts.append(f"🔀 {truncated_branch}")
|
|
163
194
|
if data.active_task.strip():
|
|
164
195
|
parts.append(data.active_task)
|
|
165
196
|
result = self._format_config.separator.join(parts)
|
|
166
197
|
|
|
167
|
-
# If still too long, remove active_task
|
|
168
|
-
if len(result) > max_length
|
|
169
|
-
parts = [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
198
|
+
# If still too long, remove output_style and active_task
|
|
199
|
+
if len(result) > max_length:
|
|
200
|
+
parts = [f"🤖 {data.model}"]
|
|
201
|
+
|
|
202
|
+
if data.claude_version:
|
|
203
|
+
claude_ver_str = (
|
|
204
|
+
data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
205
|
+
)
|
|
206
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
207
|
+
|
|
208
|
+
parts.append(f"🗿 {version_str}")
|
|
209
|
+
|
|
173
210
|
if data.git_status:
|
|
174
211
|
parts.append(f"📊 {data.git_status}")
|
|
175
212
|
parts.append(f"🔀 {truncated_branch}")
|
|
@@ -185,7 +222,7 @@ class StatuslineRenderer:
|
|
|
185
222
|
"""
|
|
186
223
|
Render extended mode: Full path and detailed info with labels
|
|
187
224
|
Constraint: <= 120 characters
|
|
188
|
-
Format: 🤖 Model | 🗿 Version |
|
|
225
|
+
New Format: 🤖 Model | 🔅 Claude Code Version | 🗿 MoAI Version | 💬 Style | 📊 Changes | 🔀 Branch
|
|
189
226
|
|
|
190
227
|
Args:
|
|
191
228
|
data: StatuslineData instance
|
|
@@ -194,6 +231,7 @@ class StatuslineRenderer:
|
|
|
194
231
|
Formatted statusline string (max 120 chars)
|
|
195
232
|
"""
|
|
196
233
|
branch = self._truncate_branch(data.branch, max_length=30)
|
|
234
|
+
version_str = data.version if data.version.startswith("v") else f"v{data.version}"
|
|
197
235
|
|
|
198
236
|
parts = []
|
|
199
237
|
|
|
@@ -201,9 +239,18 @@ class StatuslineRenderer:
|
|
|
201
239
|
if self._display_config.model:
|
|
202
240
|
parts.append(f"🤖 {data.model}")
|
|
203
241
|
|
|
204
|
-
# Add version if
|
|
242
|
+
# Add Claude Code version if available
|
|
243
|
+
if data.claude_version:
|
|
244
|
+
claude_ver_str = data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
245
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
246
|
+
|
|
247
|
+
# Add MoAI version if display enabled
|
|
205
248
|
if self._display_config.version:
|
|
206
|
-
parts.append(f"🗿
|
|
249
|
+
parts.append(f"🗿 {version_str}")
|
|
250
|
+
|
|
251
|
+
# Add output style if not empty
|
|
252
|
+
if data.output_style:
|
|
253
|
+
parts.append(f"💬 {data.output_style}")
|
|
207
254
|
|
|
208
255
|
# Add git status if display enabled and status not empty
|
|
209
256
|
if self._display_config.git_status and data.git_status:
|
|
@@ -221,26 +268,27 @@ class StatuslineRenderer:
|
|
|
221
268
|
|
|
222
269
|
# If exceeds limit, try truncating branch
|
|
223
270
|
if len(result) > 120:
|
|
224
|
-
branch = self._truncate_branch(data.branch, max_length=
|
|
225
|
-
parts = [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
271
|
+
branch = self._truncate_branch(data.branch, max_length=30)
|
|
272
|
+
parts = [f"🤖 {data.model}"]
|
|
273
|
+
|
|
274
|
+
if data.claude_version:
|
|
275
|
+
claude_ver_str = (
|
|
276
|
+
data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
277
|
+
)
|
|
278
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
279
|
+
|
|
280
|
+
parts.append(f"🗿 {version_str}")
|
|
281
|
+
|
|
282
|
+
# Add git status if display enabled and not empty
|
|
283
|
+
if self._display_config.git_status and data.git_status:
|
|
284
|
+
parts.append(f"📊 {data.git_status}")
|
|
285
|
+
|
|
286
|
+
# Add output style if not empty
|
|
287
|
+
if data.output_style:
|
|
288
|
+
parts.append(f"💬 {data.output_style}")
|
|
239
289
|
|
|
240
290
|
parts.append(f"🔀 {branch}")
|
|
241
291
|
|
|
242
|
-
if data.git_status:
|
|
243
|
-
parts.append(f"Changes: {data.git_status}")
|
|
244
292
|
if data.active_task.strip():
|
|
245
293
|
parts.append(data.active_task)
|
|
246
294
|
result = self._format_config.separator.join(parts)
|
|
@@ -251,7 +299,7 @@ class StatuslineRenderer:
|
|
|
251
299
|
"""
|
|
252
300
|
Render minimal mode: Extreme space constraint with minimal labels
|
|
253
301
|
Constraint: <= 40 characters
|
|
254
|
-
Format: 🤖 Model |
|
|
302
|
+
New Format: 🤖 Model | 🔅 Claude Code Ver | 🗿 MoAI Ver | Changes
|
|
255
303
|
|
|
256
304
|
Args:
|
|
257
305
|
data: StatuslineData instance
|
|
@@ -265,9 +313,20 @@ class StatuslineRenderer:
|
|
|
265
313
|
if self._display_config.model:
|
|
266
314
|
parts.append(f"🤖 {data.model}")
|
|
267
315
|
|
|
268
|
-
# Add version if
|
|
316
|
+
# Add Claude Code version if available (truncated for minimal)
|
|
317
|
+
if data.claude_version:
|
|
318
|
+
claude_ver_str = data.claude_version if data.claude_version.startswith("v") else f"v{data.claude_version}"
|
|
319
|
+
# For minimal mode, just show major.minor (e.g., "v2.0" from "v2.0.46")
|
|
320
|
+
if len(claude_ver_str.split(".")) > 2:
|
|
321
|
+
claude_ver_str = ".".join(claude_ver_str.split(".")[:2])
|
|
322
|
+
parts.append(f"🔅 {claude_ver_str}")
|
|
323
|
+
|
|
324
|
+
# Add MoAI version if display enabled
|
|
269
325
|
if self._display_config.version:
|
|
270
|
-
|
|
326
|
+
truncated_ver = self._truncate_version(data.version)
|
|
327
|
+
# Add 'v' prefix if not already present
|
|
328
|
+
version_str = truncated_ver if truncated_ver.startswith("v") else f"v{truncated_ver}"
|
|
329
|
+
parts.append(f"🗿 {version_str}")
|
|
271
330
|
|
|
272
331
|
result = self._format_config.separator.join(parts)
|
|
273
332
|
|
|
@@ -275,16 +334,13 @@ class StatuslineRenderer:
|
|
|
275
334
|
# and if display is enabled and status not empty
|
|
276
335
|
if self._display_config.git_status and data.git_status:
|
|
277
336
|
status_label = f"Chg: {data.git_status}"
|
|
278
|
-
if (
|
|
279
|
-
len(result) + len(status_label) + len(self._format_config.separator)
|
|
280
|
-
<= 40
|
|
281
|
-
):
|
|
337
|
+
if len(result) + len(status_label) + len(self._format_config.separator) <= 40:
|
|
282
338
|
result += f"{self._format_config.separator}{status_label}"
|
|
283
339
|
|
|
284
340
|
return result
|
|
285
341
|
|
|
286
342
|
@staticmethod
|
|
287
|
-
def _truncate_branch(branch: str, max_length: int =
|
|
343
|
+
def _truncate_branch(branch: str, max_length: int = 30) -> str:
|
|
288
344
|
"""
|
|
289
345
|
Truncate branch name intelligently, preserving SPEC ID if present
|
|
290
346
|
|
|
@@ -309,7 +365,7 @@ class StatuslineRenderer:
|
|
|
309
365
|
return spec_truncated
|
|
310
366
|
|
|
311
367
|
# Simple truncation with ellipsis for very long names
|
|
312
|
-
return f"{branch[:max_length-1]}…" if len(branch) > max_length else branch
|
|
368
|
+
return f"{branch[: max_length - 1]}…" if len(branch) > max_length else branch
|
|
313
369
|
|
|
314
370
|
@staticmethod
|
|
315
371
|
def _truncate_version(version: str) -> str:
|
|
@@ -68,9 +68,7 @@ class UpdateChecker:
|
|
|
68
68
|
UpdateInfo from PyPI or error default
|
|
69
69
|
"""
|
|
70
70
|
try:
|
|
71
|
-
with urllib.request.urlopen(
|
|
72
|
-
self._PYPI_API_URL, timeout=self._TIMEOUT_SECONDS
|
|
73
|
-
) as response:
|
|
71
|
+
with urllib.request.urlopen(self._PYPI_API_URL, timeout=self._TIMEOUT_SECONDS) as response:
|
|
74
72
|
data = json.loads(response.read().decode("utf-8"))
|
|
75
73
|
|
|
76
74
|
latest_version = data.get("info", {}).get("version")
|
|
@@ -108,12 +106,8 @@ class UpdateChecker:
|
|
|
108
106
|
latest_clean = latest.lstrip("v")
|
|
109
107
|
|
|
110
108
|
# Split by dots and convert to integers
|
|
111
|
-
current_parts = [
|
|
112
|
-
|
|
113
|
-
]
|
|
114
|
-
latest_parts = [
|
|
115
|
-
int(x) for x in re.split(r"[^\d]+", latest_clean) if x.isdigit()
|
|
116
|
-
]
|
|
109
|
+
current_parts = [int(x) for x in re.split(r"[^\d]+", current_clean) if x.isdigit()]
|
|
110
|
+
latest_parts = [int(x) for x in re.split(r"[^\d]+", latest_clean) if x.isdigit()]
|
|
117
111
|
|
|
118
112
|
# Compare version tuples
|
|
119
113
|
return tuple(latest_parts) > tuple(current_parts)
|