@fprad0/skill-master-mcp 0.0.12 → 1.0.1
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.
- package/CHANGELOG.md +100 -88
- package/README.md +472 -472
- package/VERSION.md +9 -9
- package/bin/lib/bootstrap-global-core.mjs +34 -0
- package/bin/lib/client-config.mjs +287 -285
- package/bin/lib/doctor-core.mjs +202 -0
- package/bin/lib/menu-core.mjs +1792 -1514
- package/bin/lib/operation-result.mjs +59 -0
- package/bin/lib/register-clients-core.mjs +247 -0
- package/bin/lib/skill-installation.mjs +215 -215
- package/bin/lib/update-cli-core.mjs +117 -0
- package/bin/skill-master-activation.mjs +165 -163
- package/bin/skill-master-bootstrap-global.mjs +61 -49
- package/bin/skill-master-configure-private-registry.mjs +3 -3
- package/bin/skill-master-doctor.mjs +239 -228
- package/bin/skill-master-eval-activation.mjs +32 -32
- package/bin/skill-master-install-global-skills.mjs +59 -59
- package/bin/skill-master-install-project-skills.mjs +97 -97
- package/bin/skill-master-menu.mjs +489 -378
- package/bin/skill-master-register-clients.mjs +232 -153
- package/bin/skill-master-success-skills.mjs +357 -307
- package/bin/skill-master-update.mjs +121 -72
- package/bin/skill-master.mjs +3 -3
- package/dist/activation.d.ts.map +1 -1
- package/dist/activation.js +12 -0
- package/dist/activation.js.map +1 -1
- package/dist/prompt-router.d.ts.map +1 -1
- package/dist/prompt-router.js +19 -0
- package/dist/prompt-router.js.map +1 -1
- package/dist/recommender.d.ts.map +1 -1
- package/dist/recommender.js +4 -1
- package/dist/recommender.js.map +1 -1
- package/docs/architecture/APRENDIZADO_DE_IMPLEMENTACOES_BEM_SUCEDIDAS.md +125 -125
- package/docs/architecture/ARQUITETURA_AUTO_UPDATE.md +9 -9
- package/docs/architecture/PLANO_MASTER_ACIONAMENTO_AUTOMATICO_E_APRENDIZADO.md +341 -341
- package/docs/architecture/REDE_SEGURA_DE_SKILLS.md +148 -148
- package/docs/operations/GUIA_MULTI_COMPUTADOR.md +262 -262
- package/docs/operations/GUIA_NPM_PRIVADO.md +294 -294
- package/docs/operations/GUIA_NPM_PUBLICO.md +147 -147
- package/docs/operations/MENU_VISUAL_EVIDENCE_2026-06-28.md +66 -66
- package/docs/operations/assets/menu-frame-compact.html +36 -33
- package/docs/operations/assets/menu-frame-dna-hero.html +87 -0
- package/docs/operations/assets/menu-frame-fine-helix.html +89 -0
- package/docs/operations/assets/menu-frame-large.html +44 -41
- package/docs/operations/assets/menu-frame-running.html +41 -38
- package/docs/operations/assets/menu-frame-score-10-contact-sheet.html +184 -0
- package/docs/operations/cross-platform-auth-transfer/ANALISE_COMPATIBILIDADE_MCP_2026-06-28.md +140 -140
- package/docs/operations/cross-platform-auth-transfer/README_TRANSFERENCIA.md +85 -85
- package/docs/operations/reborn-menu-cyberpunk-transfer/ANALISE_MENU_REBORN_CYBERPUNK_2026-06-28.md +174 -174
- package/docs/operations/reborn-menu-cyberpunk-transfer/HANDOFF_IMPLEMENTACAO_REBORN_CYBERPUNK_2026-06-28.md +119 -119
- package/docs/operations/reborn-menu-cyberpunk-transfer/ORDEM_DE_EXECUCAO_MENU_REBORN_CYBERPUNK.md +134 -134
- package/docs/operations/reborn-menu-cyberpunk-transfer/README_TRANSFERENCIA.md +84 -84
- package/docs/operations/reborn-menu-cyberpunk-transfer/README_TRANSFERENCIA_REBORN_PACKAGE.md +56 -56
- package/docs/operations/token-economy-transfer/ANALISE_AVANCADA_ECONOMIA_TOKENS_2026-06-30.md +141 -0
- package/docs/operations/token-economy-transfer/PLANO_DEV_SENIOR_MASTER_TOKEN_ECONOMY_2026-06-30.md +171 -0
- package/docs/operations/token-economy-transfer/README_TRANSFERENCIA_TOKEN_ECONOMY.md +31 -0
- package/docs/planning/MENU_RUNTIME_CORRECTION_PLAN_2026-06-30.md +551 -0
- package/docs/planning/V0_0_9_APROVACAO_CRITICA_MENSAGENS_DE_VENDA.md +85 -85
- package/docs/planning/V0_0_9_FONTES_E_CRITERIOS_DE_AUTORIDADE.md +139 -139
- package/docs/planning/V0_0_9_MATRIZ_SKILLS_MULTIDISCIPLINARES.md +105 -105
- package/docs/planning/V0_0_9_POLITICA_MORAL_CATOLICA_PARA_IA.md +181 -181
- package/docs/planning/V0_0_9_PROMPTS_EXECUCAO.md +59 -59
- package/docs/planning/V0_0_9_ROADMAP_DISCERNIMENTO_E_CONHECIMENTO_AMPLO.md +181 -181
- package/docs/planning/mcp-1.0.0/00_RESUMO_EXECUTIVO_AUDITORIA_MENU.md +118 -0
- package/docs/planning/mcp-1.0.0/01_MATRIZ_TESTES_MENU_E_RESULTADOS.md +250 -0
- package/docs/planning/mcp-1.0.0/02_PLANO_CORRECAO_ATIVAR_SKILL_APRENDIDA.md +200 -0
- package/docs/planning/mcp-1.0.0/03_PLANO_COMPATIBILIDADE_WINDOWS_LINUX_MACOS.md +167 -0
- package/docs/planning/mcp-1.0.0/04_PLANO_UI_CYBERPUNK_PIXEL_ART_E_PERFORMANCE.md +165 -0
- package/docs/planning/mcp-1.0.0/05_PROMPT_TASK_EXECUCAO_CORRECOES.md +151 -0
- package/docs/planning/mcp-1.0.0/06_CHECKLIST_REGRESSAO_PRE_RELEASE.md +159 -0
- package/docs/planning/mcp-1.0.0/07_RELATORIO_APLICACAO_CORRECOES_MENU_SKILL_MASTER.md +136 -0
- package/docs/planning/mcp-1.0.0/08_AUDITORIA_CRITICA_MENU_NOTA_E_DNA_REFINADO.md +184 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/00_PROMPT_TASK_MASTER_NOTA_10_10.md +103 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/01_PROMPT_TASK_FINE_HELIX_DNA.md +116 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/02_PROMPT_TASK_DNA_HERO_BOOT_AND_MOTION.md +109 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/03_PROMPT_TASK_MENU_UX_HELP_ERROR_COPY.md +99 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/04_PROMPT_TASK_EVIDENCE_RENDERER_1_0_0.md +97 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/05_PROMPT_TASK_CROSS_PLATFORM_UTF8_MOJIBAKE.md +99 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/06_PROMPT_TASK_VISUAL_REGRESSION_QA.md +105 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/07_PROMPT_TASK_PRE_RELEASE_SCORE_GATE_10_10.md +104 -0
- package/docs/planning/mcp-1.0.0/prompt-tasks-nota-10-10/README_ORDEM_EXECUCAO_NOTA_10_10.md +77 -0
- package/docs/prompt-tasks/PROMPT_TASK_001_BOOTSTRAP_SKILL_MASTER_MCP.md +6 -6
- package/docs/prompt-tasks/PROMPT_TASK_002_AUTO_UPDATE_LAUNCHER.md +6 -6
- package/docs/prompt-tasks/PROMPT_TASK_003_REMOTE_MANIFEST_AND_RELEASES.md +6 -6
- package/docs/prompt-tasks/PROMPT_TASK_004_MULTI_USER_DISTRIBUTION.md +6 -6
- package/docs/prompt-tasks/PROMPT_TASK_005_SECURITY_AND_QUALITY_GATE.md +6 -6
- package/docs/prompt-tasks/PROMPT_TASK_006_MASTER_ACIONAMENTO_APRENDIZADO.md +83 -83
- package/docs/prompt-tasks/PROMPT_TASK_007_PERSONA_ORQUESTRADORA.md +88 -88
- package/docs/prompt-tasks/PROMPT_TASK_008_PROMPT_ROUTER_MODOS_ATIVACAO.md +156 -156
- package/docs/prompt-tasks/PROMPT_TASK_009_PIPELINE_APRENDIZADO_SUCESSO.md +105 -105
- package/docs/prompt-tasks/PROMPT_TASK_010_EVALS_GOVERNANCA_ATIVACAO.md +119 -119
- package/docs/prompt-tasks/PROMPT_TASK_011_MENU_NOTIFICACOES_NOTION.md +120 -120
- package/docs/prompt-tasks/PROMPT_TASK_012_MENU_CYBERPUNK_PIXEL_FRAME.md +123 -123
- package/docs/prompt-tasks/PROMPT_TASK_013_MENU_FLUID_DNA_ANIMATION.md +114 -114
- package/docs/prompt-tasks/PROMPT_TASK_014_MENU_FUNCTIONAL_PARITY_QA.md +157 -157
- package/docs/prompt-tasks/PROMPT_TASK_015_TRANSFER_RELEASE_HANDOFF.md +127 -127
- package/docs/prompt-tasks/PROMPT_TASK_016_CROSS_PLATFORM_MCP_AUTH_REGISTRATION.md +107 -107
- package/docs/prompt-tasks/PROMPT_TASK_018_NPM_PUBLISH_2FA_SETUP.md +80 -80
- package/docs/prompt-tasks/PROMPT_TASK_019_TOKEN_ECONOMY_GLOBAL_SKILLS.md +56 -0
- package/docs/prompt-tasks/PROMPT_TASK_MASTER_EXECUTOR.md +6 -6
- package/docs/skill-candidates/v0.0.10/cli-creator/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/cli-creator/SKILL.md +160 -160
- package/docs/skill-candidates/v0.0.10/cli-creator/agents/openai.yaml +4 -4
- package/docs/skill-candidates/v0.0.10/cli-creator/references/agent-cli-patterns.md +154 -154
- package/docs/skill-candidates/v0.0.10/developer-workstation-ops/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.10/figma/LICENSE.txt +1 -1
- package/docs/skill-candidates/v0.0.10/figma/SKILL.md +42 -42
- package/docs/skill-candidates/v0.0.10/figma/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma/references/figma-mcp-config.md +35 -35
- package/docs/skill-candidates/v0.0.10/figma/references/figma-tools-and-prompts.md +34 -34
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/LICENSE.TXT +1 -1
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/SKILL.md +349 -349
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/references/mapping-checklist.md +7 -7
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/scripts/normalize_node_id.py +25 -25
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/LICENSE.TXT +1 -1
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/SKILL.md +537 -537
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/references/rule-template.md +15 -15
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/scripts/check_agents_md.sh +9 -9
- package/docs/skill-candidates/v0.0.10/figma-generate-design/LICENSE.TXT +1 -1
- package/docs/skill-candidates/v0.0.10/figma-generate-design/SKILL.md +341 -341
- package/docs/skill-candidates/v0.0.10/figma-generate-design/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-generate-design/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-generate-design/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-generate-design/maintainers.yml +1 -1
- package/docs/skill-candidates/v0.0.10/figma-generate-library/LICENSE.TXT +1 -1
- package/docs/skill-candidates/v0.0.10/figma-generate-library/SKILL.md +314 -314
- package/docs/skill-candidates/v0.0.10/figma-generate-library/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-generate-library/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-generate-library/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-generate-library/maintainers.yml +3 -3
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/code-connect-setup.md +260 -260
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/component-creation.md +1014 -1014
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/discovery-phase.md +518 -518
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/documentation-creation.md +834 -834
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/error-recovery.md +540 -540
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/naming-conventions.md +527 -527
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/token-creation.md +962 -962
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/bindVariablesToComponent.js +110 -110
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/cleanupOrphans.js +127 -127
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createComponentWithVariants.js +148 -148
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createDocumentationPage.js +139 -139
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createSemanticTokens.js +108 -108
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createVariableCollection.js +49 -49
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/inspectFileStructure.js +121 -121
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/rehydrateState.js +92 -92
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/validateCreation.js +83 -83
- package/docs/skill-candidates/v0.0.10/figma-implement-design/LICENSE.txt +1 -1
- package/docs/skill-candidates/v0.0.10/figma-implement-design/SKILL.md +258 -258
- package/docs/skill-candidates/v0.0.10/figma-implement-design/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-implement-design/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-implement-design/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-use/LICENSE.TXT +1 -1
- package/docs/skill-candidates/v0.0.10/figma-use/SKILL.md +233 -233
- package/docs/skill-candidates/v0.0.10/figma-use/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/figma-use/assets/figma-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/figma-use/assets/icon.svg +28 -28
- package/docs/skill-candidates/v0.0.10/figma-use/maintainers.yml +1 -1
- package/docs/skill-candidates/v0.0.10/figma-use/references/api-reference.md +301 -301
- package/docs/skill-candidates/v0.0.10/figma-use/references/common-patterns.md +512 -512
- package/docs/skill-candidates/v0.0.10/figma-use/references/component-patterns.md +488 -488
- package/docs/skill-candidates/v0.0.10/figma-use/references/effect-style-patterns.md +123 -123
- package/docs/skill-candidates/v0.0.10/figma-use/references/gotchas.md +599 -599
- package/docs/skill-candidates/v0.0.10/figma-use/references/maintainers.yml +12 -12
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-patterns.md +513 -513
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-standalone.d.ts +11293 -11293
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-standalone.index.md +441 -441
- package/docs/skill-candidates/v0.0.10/figma-use/references/text-style-patterns.md +203 -203
- package/docs/skill-candidates/v0.0.10/figma-use/references/validation-and-recovery.md +109 -109
- package/docs/skill-candidates/v0.0.10/figma-use/references/variable-patterns.md +354 -354
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/maintainers.yml +9 -9
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components--creating.md +17 -17
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components--using.md +17 -17
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components.md +50 -50
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-effect-styles.md +52 -52
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-text-styles.md +90 -90
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables--creating.md +13 -13
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables--using.md +13 -13
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables.md +64 -64
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds.md +41 -41
- package/docs/skill-candidates/v0.0.10/frontend-design/LICENSE.txt +177 -177
- package/docs/skill-candidates/v0.0.10/frontend-design/SKILL.md +55 -55
- package/docs/skill-candidates/v0.0.10/frontend-ui-ux-systems/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.10/github/SKILL.md +74 -74
- package/docs/skill-candidates/v0.0.10/github/agents/openai.yaml +6 -6
- package/docs/skill-candidates/v0.0.10/github/assets/github-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/image-graphic-design-rendering/SKILL.md +28 -28
- package/docs/skill-candidates/v0.0.10/language-quality-pt-en-fr-it-ru/SKILL.md +28 -28
- package/docs/skill-candidates/v0.0.10/math-physics-reasoning/SKILL.md +28 -28
- package/docs/skill-candidates/v0.0.10/mcp-builder/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/mcp-builder/SKILL.md +236 -236
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/evaluation.md +601 -601
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/mcp_best_practices.md +249 -249
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/node_mcp_server.md +969 -969
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/python_mcp_server.md +718 -718
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/connections.py +151 -151
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/evaluation.py +373 -373
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/example_evaluation.xml +22 -22
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/requirements.txt +2 -2
- package/docs/skill-candidates/v0.0.10/mcp-client-readiness/SKILL.md +31 -31
- package/docs/skill-candidates/v0.0.10/openai-docs/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/openai-docs/SKILL.md +161 -161
- package/docs/skill-candidates/v0.0.10/openai-docs/agents/openai.yaml +14 -14
- package/docs/skill-candidates/v0.0.10/openai-docs/assets/openai-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/openai-docs/references/latest-model.md +37 -37
- package/docs/skill-candidates/v0.0.10/openai-docs/references/prompting-guide.md +244 -244
- package/docs/skill-candidates/v0.0.10/openai-docs/references/upgrade-guide.md +181 -181
- package/docs/skill-candidates/v0.0.10/openai-docs/scripts/fetch-codex-manual.mjs +598 -598
- package/docs/skill-candidates/v0.0.10/openai-docs/scripts/resolve-latest-model-info.js +147 -147
- package/docs/skill-candidates/v0.0.10/playwright/NOTICE.txt +14 -14
- package/docs/skill-candidates/v0.0.10/playwright/SKILL.md +147 -147
- package/docs/skill-candidates/v0.0.10/playwright/agents/openai.yaml +6 -6
- package/docs/skill-candidates/v0.0.10/playwright/assets/playwright-small.svg +3 -3
- package/docs/skill-candidates/v0.0.10/playwright/references/cli.md +116 -116
- package/docs/skill-candidates/v0.0.10/playwright/references/workflows.md +95 -95
- package/docs/skill-candidates/v0.0.10/playwright/scripts/playwright_cli.sh +25 -25
- package/docs/skill-candidates/v0.0.10/polyglot-backend-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.10/screenshot/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/screenshot/SKILL.md +267 -267
- package/docs/skill-candidates/v0.0.10/screenshot/agents/openai.yaml +6 -6
- package/docs/skill-candidates/v0.0.10/screenshot/assets/screenshot-small.svg +5 -5
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/ensure_macos_permissions.sh +54 -54
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_display_info.swift +22 -22
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_permissions.swift +40 -40
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_window_info.swift +126 -126
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/take_screenshot.ps1 +163 -163
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/take_screenshot.py +585 -585
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/SKILL.md +62 -62
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/agents/openai.yaml +4 -4
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/activation-policy.md +77 -77
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/human-approval-policy.md +83 -83
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/persona-dev-senior-master.md +46 -46
- package/docs/skill-candidates/v0.0.10/terminal-menu-operations/SKILL.md +30 -30
- package/docs/skill-candidates/v0.0.10/terminal-pixel-art-tui/SKILL.md +43 -43
- package/docs/skill-candidates/v0.0.10/webapp-testing/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/webapp-testing/SKILL.md +95 -95
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/console_logging.py +34 -34
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/element_discovery.py +39 -39
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/static_html_automation.py +32 -32
- package/docs/skill-candidates/v0.0.10/webapp-testing/scripts/with_server.py +105 -105
- package/docs/skill-candidates/v0.0.10/winui-app/LICENSE.txt +201 -201
- package/docs/skill-candidates/v0.0.10/winui-app/SKILL.md +94 -94
- package/docs/skill-candidates/v0.0.10/winui-app/agents/openai.yaml +5 -5
- package/docs/skill-candidates/v0.0.10/winui-app/config.yaml +50 -50
- package/docs/skill-candidates/v0.0.10/winui-app/references/_sections.md +96 -96
- package/docs/skill-candidates/v0.0.10/winui-app/references/accessibility-input-and-localization.md +51 -51
- package/docs/skill-candidates/v0.0.10/winui-app/references/build-run-and-launch-verification.md +72 -72
- package/docs/skill-candidates/v0.0.10/winui-app/references/community-toolkit-controls-and-helpers.md +57 -57
- package/docs/skill-candidates/v0.0.10/winui-app/references/controls-layout-and-adaptive-ui.md +84 -84
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-environment-audit-and-remediation.md +82 -82
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-setup-and-project-selection.md +67 -67
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-template-first-recovery.md +62 -62
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-winui-app-structure.md +62 -62
- package/docs/skill-candidates/v0.0.10/winui-app/references/motion-animations-and-polish.md +45 -45
- package/docs/skill-candidates/v0.0.10/winui-app/references/performance-diagnostics-and-responsiveness.md +46 -46
- package/docs/skill-candidates/v0.0.10/winui-app/references/sample-source-map.md +37 -37
- package/docs/skill-candidates/v0.0.10/winui-app/references/shell-navigation-and-windowing.md +67 -67
- package/docs/skill-candidates/v0.0.10/winui-app/references/styling-theming-materials-and-icons.md +71 -71
- package/docs/skill-candidates/v0.0.10/winui-app/references/testing-debugging-and-review-checklists.md +77 -77
- package/docs/skill-candidates/v0.0.10/winui-app/references/windows-app-sdk-lifecycle-notifications-and-deployment.md +52 -52
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/SKILL.md +398 -398
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/common-patterns.md +330 -330
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/complete-examples.md +871 -871
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/component-patterns.md +501 -501
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/data-fetching.md +766 -766
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/file-organization.md +501 -501
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/loading-and-error-states.md +500 -500
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/performance.md +405 -405
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/routing-guide.md +363 -363
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/styling-guide.md +427 -427
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/typescript-standards.md +417 -417
- package/docs/skill-candidates/v0.0.11/git-version-control-ops/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/go-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/java-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/javascript-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/json-contract-design/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/multi-client-mcp-ops/SKILL.md +36 -36
- package/docs/skill-candidates/v0.0.11/nextjs/SKILL.md +745 -745
- package/docs/skill-candidates/v0.0.11/nextjs/agents/openai.yaml +3 -3
- package/docs/skill-candidates/v0.0.11/nextjs/references/app-router-files.md +94 -94
- package/docs/skill-candidates/v0.0.11/python-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/ruby-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/senior-fullstack/SKILL.md +209 -209
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/architecture_patterns.md +103 -103
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/development_workflows.md +103 -103
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/tech_stack_guide.md +103 -103
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/code_quality_analyzer.py +114 -114
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/fullstack_scaffolder.py +114 -114
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/project_scaffolder.py +114 -114
- package/docs/skill-candidates/v0.0.11/shadcn/SKILL.md +573 -573
- package/docs/skill-candidates/v0.0.11/shadcn/agents/openai.yaml +3 -3
- package/docs/skill-candidates/v0.0.11/sql-postgresql-engineering/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/terminal-shell-ops/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/typescript-expert/SKILL.md +429 -429
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/tsconfig-strict.json +91 -91
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/typescript-cheatsheet.md +383 -383
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/utility-types.ts +335 -335
- package/docs/skill-candidates/v0.0.11/typescript-expert/scripts/ts_diagnostic.py +203 -203
- package/docs/skill-candidates/v0.0.11/ui-component-primitives/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/web-mobile-design-systems/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.11/windows-linux-platform-ops/SKILL.md +34 -34
- package/docs/skill-candidates/v0.0.12/context-compression-handoff/SKILL.md +47 -0
- package/docs/skill-candidates/v0.0.12/csharp-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/css-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/go-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/html-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/javascript-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/json-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/prompt-budget-gate/SKILL.md +46 -0
- package/docs/skill-candidates/v0.0.12/python-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/react-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/ruby-senior-master-engineering/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.12/senior-master-code-optimizer/SKILL.md +48 -48
- package/docs/skill-candidates/v0.0.12/sql-senior-master-engineering/SKILL.md +31 -31
- package/docs/skill-candidates/v0.0.12/token-economy-orchestrator/SKILL.md +38 -0
- package/docs/skill-candidates/v0.0.12/typescript-senior-master-engineering/SKILL.md +35 -35
- package/docs/skill-candidates/v0.0.9/ai-ethics-human-dignity/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.9/broad-domain-router/SKILL.md +41 -41
- package/docs/skill-candidates/v0.0.9/catholic-moral-discernment/SKILL.md +31 -31
- package/docs/skill-candidates/v0.0.9/engineering-systems-master/SKILL.md +31 -31
- package/docs/skill-candidates/v0.0.9/language-quality-pt-en-fr/SKILL.md +28 -28
- package/docs/skill-candidates/v0.0.9/math-science-reasoning/SKILL.md +29 -29
- package/docs/skill-candidates/v0.0.9/philosophy-sociology-discernment/SKILL.md +28 -28
- package/docs/skill-candidates/v0.0.9/professional-boundary-triage/SKILL.md +40 -40
- package/docs/skill-candidates/v0.0.9/release-ethics-gate/SKILL.md +32 -32
- package/docs/skill-candidates/v0.0.9/source-authority-reviewer/SKILL.md +31 -31
- package/examples/client-configs/claude-code.commands.md +21 -21
- package/examples/client-configs/claude-code.project.mcp.json +18 -18
- package/examples/client-configs/claude-desktop.macos.json +18 -18
- package/examples/client-configs/claude-desktop.windows.json +20 -20
- package/examples/client-configs/codex.windows.toml +11 -11
- package/examples/client-configs/gemini-code-assist.intellij.mcp.json +18 -18
- package/examples/client-configs/gemini.linux.settings.json +21 -21
- package/examples/client-configs/gemini.windows.settings.json +23 -23
- package/examples/client-configs/generic-stdio.json +16 -16
- package/manifests/channels/beta.json +24 -24
- package/manifests/channels/stable.json +25 -25
- package/network/approved-skills.json +54 -54
- package/network/unapproved-skill-candidates.json +110 -110
- package/package.json +89 -86
- package/scripts/configure-private-registry.mjs +208 -208
- package/scripts/lib/private-registry.mjs +97 -97
- package/scripts/render-menu-evidence.mjs +196 -130
- package/scripts/verify-menu-actions.mjs +112 -107
- package/scripts/verify-menu-visual.mjs +90 -0
- package/sources.json +11 -11
package/bin/lib/menu-core.mjs
CHANGED
|
@@ -1,1522 +1,1800 @@
|
|
|
1
|
-
import { spawn } from 'node:child_process';
|
|
2
|
-
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import { dirname, join } from 'node:path';
|
|
5
|
-
import process from 'node:process';
|
|
6
|
-
import {
|
|
7
|
-
assessCodexConfigContent,
|
|
8
|
-
assessMcpServerConfig,
|
|
9
|
-
defaultClientConfigPaths,
|
|
10
|
-
} from './client-config.mjs';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'figma
|
|
80
|
-
'figma-
|
|
81
|
-
'figma-
|
|
82
|
-
'figma-
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
'
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'senior-master-
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
'
|
|
133
|
-
'
|
|
134
|
-
'
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
'
|
|
138
|
-
'
|
|
139
|
-
'
|
|
140
|
-
'
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
function
|
|
359
|
-
if (!
|
|
360
|
-
return
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
[
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
[
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
const
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
return
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
const
|
|
1005
|
-
const
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
);
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
?.
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
const
|
|
1149
|
-
const
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
const
|
|
1168
|
-
const
|
|
1169
|
-
const
|
|
1170
|
-
const
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
const
|
|
1238
|
-
const
|
|
1239
|
-
const
|
|
1240
|
-
const
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
fitText(colorize(
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
import {
|
|
7
|
+
assessCodexConfigContent,
|
|
8
|
+
assessMcpServerConfig,
|
|
9
|
+
defaultClientConfigPaths,
|
|
10
|
+
} from './client-config.mjs';
|
|
11
|
+
import { buildOperationResultCopy } from './operation-result.mjs';
|
|
12
|
+
|
|
13
|
+
const ANSI = {
|
|
14
|
+
reset: '\x1b[0m',
|
|
15
|
+
bold: '\x1b[1m',
|
|
16
|
+
dim: '\x1b[2m',
|
|
17
|
+
cyan: '\x1b[36m',
|
|
18
|
+
green: '\x1b[32m',
|
|
19
|
+
yellow: '\x1b[33m',
|
|
20
|
+
red: '\x1b[31m',
|
|
21
|
+
white: '\x1b[37m',
|
|
22
|
+
gray: '\x1b[90m',
|
|
23
|
+
teal: '\x1b[38;5;80m',
|
|
24
|
+
amber: '\x1b[38;5;179m',
|
|
25
|
+
blue: '\x1b[38;5;75m',
|
|
26
|
+
rose: '\x1b[38;5;211m',
|
|
27
|
+
violet: '\x1b[38;5;141m',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const REQUIRED_GLOBAL_SKILLS = [
|
|
31
|
+
'catholic-moral-discernment',
|
|
32
|
+
'ai-ethics-human-dignity',
|
|
33
|
+
'professional-boundary-triage',
|
|
34
|
+
'broad-domain-router',
|
|
35
|
+
'language-quality-pt-en-fr',
|
|
36
|
+
'math-science-reasoning',
|
|
37
|
+
'philosophy-sociology-discernment',
|
|
38
|
+
'engineering-systems-master',
|
|
39
|
+
'source-authority-reviewer',
|
|
40
|
+
'release-ethics-gate',
|
|
41
|
+
'mcp-client-readiness',
|
|
42
|
+
'terminal-menu-operations',
|
|
43
|
+
'terminal-pixel-art-tui',
|
|
44
|
+
'senior-master-code-optimizer',
|
|
45
|
+
'typescript-senior-master-engineering',
|
|
46
|
+
'python-senior-master-engineering',
|
|
47
|
+
'javascript-senior-master-engineering',
|
|
48
|
+
'go-senior-master-engineering',
|
|
49
|
+
'sql-senior-master-engineering',
|
|
50
|
+
'json-senior-master-engineering',
|
|
51
|
+
'ruby-senior-master-engineering',
|
|
52
|
+
'react-senior-master-engineering',
|
|
53
|
+
'html-senior-master-engineering',
|
|
54
|
+
'css-senior-master-engineering',
|
|
55
|
+
'csharp-senior-master-engineering',
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
const BUNDLED_SKILL_DOMAIN_GROUPS = [
|
|
59
|
+
{
|
|
60
|
+
key: 'moral',
|
|
61
|
+
label: 'moral-core',
|
|
62
|
+
skills: [
|
|
63
|
+
'ai-ethics-human-dignity',
|
|
64
|
+
'broad-domain-router',
|
|
65
|
+
'catholic-moral-discernment',
|
|
66
|
+
'engineering-systems-master',
|
|
67
|
+
'language-quality-pt-en-fr',
|
|
68
|
+
'math-science-reasoning',
|
|
69
|
+
'philosophy-sociology-discernment',
|
|
70
|
+
'professional-boundary-triage',
|
|
71
|
+
'release-ethics-gate',
|
|
72
|
+
'source-authority-reviewer',
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: 'frontend',
|
|
77
|
+
label: 'frontend-ui',
|
|
78
|
+
skills: [
|
|
79
|
+
'figma',
|
|
80
|
+
'figma-code-connect-components',
|
|
81
|
+
'figma-create-design-system-rules',
|
|
82
|
+
'figma-generate-design',
|
|
83
|
+
'figma-generate-library',
|
|
84
|
+
'figma-implement-design',
|
|
85
|
+
'figma-use',
|
|
86
|
+
'frontend-dev-guidelines',
|
|
87
|
+
'frontend-design',
|
|
88
|
+
'frontend-ui-ux-systems',
|
|
89
|
+
'html-senior-master-engineering',
|
|
90
|
+
'nextjs',
|
|
91
|
+
'playwright',
|
|
92
|
+
'react-senior-master-engineering',
|
|
93
|
+
'screenshot',
|
|
94
|
+
'senior-fullstack',
|
|
95
|
+
'shadcn',
|
|
96
|
+
'css-senior-master-engineering',
|
|
97
|
+
'ui-component-primitives',
|
|
98
|
+
'webapp-testing',
|
|
99
|
+
'web-mobile-design-systems',
|
|
100
|
+
'winui-app',
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: 'backend',
|
|
105
|
+
label: 'backend-data',
|
|
106
|
+
skills: [
|
|
107
|
+
'csharp-senior-master-engineering',
|
|
108
|
+
'go-engineering',
|
|
109
|
+
'go-senior-master-engineering',
|
|
110
|
+
'java-engineering',
|
|
111
|
+
'javascript-engineering',
|
|
112
|
+
'javascript-senior-master-engineering',
|
|
113
|
+
'json-contract-design',
|
|
114
|
+
'json-senior-master-engineering',
|
|
115
|
+
'mcp-builder',
|
|
116
|
+
'polyglot-backend-engineering',
|
|
117
|
+
'python-engineering',
|
|
118
|
+
'python-senior-master-engineering',
|
|
119
|
+
'ruby-engineering',
|
|
120
|
+
'ruby-senior-master-engineering',
|
|
121
|
+
'senior-master-code-optimizer',
|
|
122
|
+
'sql-postgresql-engineering',
|
|
123
|
+
'sql-senior-master-engineering',
|
|
124
|
+
'typescript-expert',
|
|
125
|
+
'typescript-senior-master-engineering',
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
key: 'ops',
|
|
130
|
+
label: 'ops-clients',
|
|
131
|
+
skills: [
|
|
132
|
+
'cli-creator',
|
|
133
|
+
'developer-workstation-ops',
|
|
134
|
+
'git-version-control-ops',
|
|
135
|
+
'github',
|
|
136
|
+
'mcp-client-readiness',
|
|
137
|
+
'multi-client-mcp-ops',
|
|
138
|
+
'openai-docs',
|
|
139
|
+
'skill-master-orchestrator',
|
|
140
|
+
'terminal-shell-ops',
|
|
141
|
+
'terminal-menu-operations',
|
|
142
|
+
'terminal-pixel-art-tui',
|
|
143
|
+
'windows-linux-platform-ops',
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: 'knowledge',
|
|
148
|
+
label: 'knowledge',
|
|
149
|
+
skills: [
|
|
150
|
+
'language-quality-pt-en-fr-it-ru',
|
|
151
|
+
'math-physics-reasoning',
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
const COMMAND_AREA_LABELS = {
|
|
157
|
+
status: 'diagnostico',
|
|
158
|
+
doctor: 'diagnostico',
|
|
159
|
+
check: 'desenvolvimento',
|
|
160
|
+
build: 'desenvolvimento',
|
|
161
|
+
publicNpm: 'distribuicao',
|
|
162
|
+
updateGlobal: 'distribuicao',
|
|
163
|
+
privateRegistry: 'registry',
|
|
164
|
+
activationStatus: 'ativacao',
|
|
165
|
+
activationBalanced: 'ativacao',
|
|
166
|
+
activationAlwaysOn: 'ativacao',
|
|
167
|
+
installGlobalSkills: 'skills-globais',
|
|
168
|
+
installProjectSkills: 'skills-projeto',
|
|
169
|
+
bootstrapGlobal: 'bootstrap-global',
|
|
170
|
+
registerClients: 'clientes-mcp',
|
|
171
|
+
promptRecommendation: 'roteamento',
|
|
172
|
+
successNotifications: 'aprendizado',
|
|
173
|
+
studySkills: 'aprendizado',
|
|
174
|
+
approvalPackage: 'aprovacao',
|
|
175
|
+
markLearnedStudy: 'aprovacao',
|
|
176
|
+
rejectLearnedSkill: 'aprovacao',
|
|
177
|
+
activateLearnedLocal: 'ativacao-skill',
|
|
178
|
+
activateLearnedGlobal: 'ativacao-skill',
|
|
179
|
+
notionSummary: 'documentacao',
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const CRITICAL_SYSTEM_SETUP_ACTIONS = new Set([
|
|
183
|
+
'bootstrapGlobal',
|
|
184
|
+
]);
|
|
185
|
+
|
|
186
|
+
const SUPPORT_SYSTEM_SETUP_ACTIONS = new Set([
|
|
187
|
+
'installGlobalSkills',
|
|
188
|
+
'registerClients',
|
|
189
|
+
]);
|
|
190
|
+
|
|
191
|
+
const ASCII_SPARKLINE = ['.', ':', ':', '-', '=', '=', '#', '#'];
|
|
192
|
+
const UNICODE_SPARKLINE = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
|
193
|
+
|
|
194
|
+
function supportsUnicodeTerminal(env = process.env) {
|
|
195
|
+
if (env.SKILL_MASTER_ASCII === '1') return false;
|
|
196
|
+
if (env.TERM === 'dumb') return false;
|
|
197
|
+
if (env.CI === 'true') return false;
|
|
198
|
+
const locale = `${env.LC_ALL ?? ''} ${env.LC_CTYPE ?? ''} ${env.LANG ?? ''}`.toLowerCase();
|
|
199
|
+
if (locale && !locale.includes('utf') && !locale.includes('65001')) return false;
|
|
200
|
+
if (process.platform === 'win32') {
|
|
201
|
+
const termProgram = `${env.WT_SESSION ?? ''} ${env.TERM_PROGRAM ?? ''} ${env.ConEmuANSI ?? ''}`.toLowerCase();
|
|
202
|
+
const codepage = `${env.CMDCMDLINE ?? ''} ${env.TERM ?? ''}`.toLowerCase();
|
|
203
|
+
return Boolean(termProgram.trim()) || codepage.includes('65001') || locale.includes('utf');
|
|
204
|
+
}
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function resolveGlyphSet({ ascii = false, env = process.env } = {}) {
|
|
209
|
+
const useAscii = ascii || !supportsUnicodeTerminal(env);
|
|
210
|
+
return useAscii
|
|
211
|
+
? {
|
|
212
|
+
ascii: true,
|
|
213
|
+
frame: 'ascii',
|
|
214
|
+
meterFilled: '#',
|
|
215
|
+
meterEmpty: '.',
|
|
216
|
+
sparkline: ASCII_SPARKLINE,
|
|
217
|
+
brailleFilled: '*',
|
|
218
|
+
}
|
|
219
|
+
: {
|
|
220
|
+
ascii: false,
|
|
221
|
+
frame: 'unicode',
|
|
222
|
+
meterFilled: '█',
|
|
223
|
+
meterEmpty: '░',
|
|
224
|
+
sparkline: UNICODE_SPARKLINE,
|
|
225
|
+
brailleFilled: null,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function colorize(text, color, enabled) {
|
|
230
|
+
return enabled ? `${color}${text}${ANSI.reset}` : text;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function getActionAttentionState(command, status) {
|
|
234
|
+
if (command?.disabledReason) return 'disabled';
|
|
235
|
+
if (!status?.globalReadiness?.ready) {
|
|
236
|
+
if (CRITICAL_SYSTEM_SETUP_ACTIONS.has(command?.key)) return 'critical';
|
|
237
|
+
if (SUPPORT_SYSTEM_SETUP_ACTIONS.has(command?.key)) return 'priority';
|
|
238
|
+
}
|
|
239
|
+
return 'normal';
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function getActionAttentionBadge(command, status) {
|
|
243
|
+
const state = getActionAttentionState(command, status);
|
|
244
|
+
if (state === 'critical') return '[SETUP AGORA] ';
|
|
245
|
+
if (state === 'priority') return '[SISTEMA] ';
|
|
246
|
+
return '';
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function formatActionBadges(action) {
|
|
250
|
+
const badges = [];
|
|
251
|
+
if (action?.effect) badges.push(action.effect.toUpperCase());
|
|
252
|
+
if (action?.risk) badges.push(`RISK:${action.risk.toUpperCase()}`);
|
|
253
|
+
if (action?.confirmMessage) badges.push('CONFIRM');
|
|
254
|
+
if (action?.requiresTty) badges.push('TTY');
|
|
255
|
+
return badges.map((badge) => `[${badge}]`).join(' ');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function getActionLineColor(command, selected, status) {
|
|
259
|
+
const state = getActionAttentionState(command, status);
|
|
260
|
+
if (selected && state === 'critical') return ANSI.rose;
|
|
261
|
+
if (selected && state === 'priority') return ANSI.amber;
|
|
262
|
+
if (selected) return ANSI.teal;
|
|
263
|
+
if (state === 'critical') return ANSI.rose;
|
|
264
|
+
if (state === 'priority') return ANSI.amber;
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function buildSetupAlertLine(status, compact) {
|
|
269
|
+
if (status?.globalReadiness?.ready) return null;
|
|
270
|
+
return compact
|
|
271
|
+
? 'SETUP GLOBAL PENDENTE -> use [SETUP AGORA] / [SISTEMA]'
|
|
272
|
+
: 'SETUP GLOBAL PENDENTE -> priorize [SETUP AGORA] e [SISTEMA] para autenticar o MCP no computador';
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function stripAnsi(text) {
|
|
276
|
+
return String(text).replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, '');
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function visibleLength(text) {
|
|
280
|
+
return stripAnsi(text).length;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function fitText(text, width) {
|
|
284
|
+
const value = String(text ?? '');
|
|
285
|
+
if (visibleLength(value) <= width) {
|
|
286
|
+
return `${value}${' '.repeat(width - visibleLength(value))}`;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return `${value.slice(0, Math.max(0, width - 1))}~`;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function truncateVisibleText(text, width) {
|
|
293
|
+
if (width <= 0) return '';
|
|
294
|
+
const value = String(text ?? '');
|
|
295
|
+
let output = '';
|
|
296
|
+
let visible = 0;
|
|
297
|
+
let hasOpenAnsi = false;
|
|
298
|
+
|
|
299
|
+
for (let index = 0; index < value.length && visible < width;) {
|
|
300
|
+
if (value[index] === '\x1b' && value[index + 1] === '[') {
|
|
301
|
+
const end = value.indexOf('m', index);
|
|
302
|
+
if (end === -1) break;
|
|
303
|
+
const sequence = value.slice(index, end + 1);
|
|
304
|
+
output += sequence;
|
|
305
|
+
hasOpenAnsi = sequence !== ANSI.reset;
|
|
306
|
+
index = end + 1;
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const [char] = Array.from(value.slice(index));
|
|
311
|
+
output += char;
|
|
312
|
+
visible += 1;
|
|
313
|
+
index += char.length;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return hasOpenAnsi ? `${output}${ANSI.reset}` : output;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function splitText(text, width, maxLines = 3) {
|
|
320
|
+
const words = String(text ?? '').split(/\s+/).filter(Boolean);
|
|
321
|
+
const lines = [];
|
|
322
|
+
let current = '';
|
|
323
|
+
|
|
324
|
+
for (const word of words) {
|
|
325
|
+
const next = current ? `${current} ${word}` : word;
|
|
326
|
+
if (next.length <= width) {
|
|
327
|
+
current = next;
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (current) lines.push(current);
|
|
331
|
+
current = word.length > width ? word.slice(0, width - 1) + '~' : word;
|
|
332
|
+
if (lines.length >= maxLines) break;
|
|
333
|
+
}
|
|
334
|
+
if (current && lines.length < maxLines) lines.push(current);
|
|
335
|
+
return lines.length ? lines : [''];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
function globalSkillsRoot() {
|
|
339
|
+
return join(process.env.CODEX_HOME ?? join(os.homedir(), '.codex'), 'skills');
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function readClientConfigState(filePath) {
|
|
343
|
+
if (!existsSync(filePath)) {
|
|
344
|
+
return { present: false, kind: 'missing', globalCommand: false };
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const content = readFileSync(filePath, 'utf8');
|
|
348
|
+
const assessment = assessCodexConfigContent(content);
|
|
349
|
+
|
|
350
|
+
return {
|
|
351
|
+
present: true,
|
|
352
|
+
kind: assessment.mode,
|
|
353
|
+
globalCommand: assessment.robust,
|
|
354
|
+
command: assessment.command,
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function readJsonState(filePath) {
|
|
359
|
+
if (!existsSync(filePath)) {
|
|
360
|
+
return { present: false, kind: 'missing', globalCommand: false };
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
try {
|
|
364
|
+
const parsed = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
365
|
+
const server = parsed?.mcpServers?.skill_master;
|
|
366
|
+
const assessment = assessMcpServerConfig(server);
|
|
367
|
+
return {
|
|
368
|
+
present: true,
|
|
369
|
+
kind: assessment.mode,
|
|
370
|
+
globalCommand: assessment.robust,
|
|
371
|
+
command: assessment.command,
|
|
372
|
+
};
|
|
373
|
+
} catch {
|
|
374
|
+
return { present: true, kind: 'invalid-json', globalCommand: false };
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function inspectGlobalReadiness() {
|
|
379
|
+
const root = globalSkillsRoot();
|
|
380
|
+
const installed = REQUIRED_GLOBAL_SKILLS.filter((name) => existsSync(join(root, name, 'SKILL.md')));
|
|
381
|
+
const missing = REQUIRED_GLOBAL_SKILLS.filter((name) => !installed.includes(name));
|
|
382
|
+
const clientPaths = defaultClientConfigPaths();
|
|
383
|
+
const codex = readClientConfigState(clientPaths.codex);
|
|
384
|
+
const claude = readJsonState(clientPaths.claude);
|
|
385
|
+
const gemini = readJsonState(clientPaths.gemini);
|
|
386
|
+
const antigravity = readJsonState(clientPaths.antigravity);
|
|
387
|
+
const ready = missing.length === 0
|
|
388
|
+
&& codex.globalCommand
|
|
389
|
+
&& claude.globalCommand
|
|
390
|
+
&& gemini.globalCommand
|
|
391
|
+
&& antigravity.globalCommand;
|
|
392
|
+
const mode = ready
|
|
393
|
+
? 'ready'
|
|
394
|
+
: codex.present || claude.present || gemini.present || antigravity.present
|
|
395
|
+
? 'partial'
|
|
396
|
+
: 'missing';
|
|
397
|
+
|
|
398
|
+
return {
|
|
399
|
+
root,
|
|
400
|
+
required: REQUIRED_GLOBAL_SKILLS.length,
|
|
401
|
+
installed,
|
|
402
|
+
missing,
|
|
403
|
+
ready,
|
|
404
|
+
mode,
|
|
405
|
+
codex,
|
|
406
|
+
claude,
|
|
407
|
+
gemini,
|
|
408
|
+
antigravity,
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export function readJson(rootDir, relativePath) {
|
|
413
|
+
const target = join(rootDir, relativePath);
|
|
414
|
+
if (!existsSync(target)) {
|
|
415
|
+
return null;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return JSON.parse(readFileSync(target, 'utf8'));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export function readText(rootDir, relativePath) {
|
|
422
|
+
const target = join(rootDir, relativePath);
|
|
423
|
+
if (!existsSync(target)) {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
return readFileSync(target, 'utf8').trim();
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export function getMenuStatus(rootDir) {
|
|
431
|
+
const packageJson = readJson(rootDir, 'package.json');
|
|
432
|
+
const stableManifest = readJson(rootDir, 'manifests/channels/stable.json');
|
|
433
|
+
const versionText = readText(rootDir, 'VERSION.md');
|
|
434
|
+
const successLearningDir = process.env.SKILL_MASTER_SUCCESS_LEARNING_DIR
|
|
435
|
+
?? join(process.env.SKILL_MASTER_HOME ?? join(process.env.HOME ?? process.env.USERPROFILE ?? '', '.skill-master'), 'data', 'success-learning');
|
|
436
|
+
const studyCandidates = readJson(rootDir, 'network/unapproved-skill-candidates.json');
|
|
437
|
+
const globalReadiness = inspectGlobalReadiness();
|
|
438
|
+
const bundledCatalog = inspectBundledSkillCatalog(rootDir);
|
|
439
|
+
|
|
440
|
+
return {
|
|
441
|
+
packageName: packageJson?.name ?? 'nao encontrado',
|
|
442
|
+
semver: packageJson?.version ?? 'nao encontrado',
|
|
443
|
+
manifestVersion: stableManifest?.version ?? 'nao encontrado',
|
|
444
|
+
manifestSemver: stableManifest?.semver ?? 'nao encontrado',
|
|
445
|
+
versionText,
|
|
446
|
+
rootDir,
|
|
447
|
+
pendingSuccessDrafts: countManifestFiles(successLearningDir),
|
|
448
|
+
studyCandidates: Array.isArray(studyCandidates?.candidates) ? studyCandidates.candidates.length : 0,
|
|
449
|
+
globalReadiness,
|
|
450
|
+
bundledCatalog,
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function countManifestFiles(directory) {
|
|
455
|
+
if (!directory || !existsSync(directory)) {
|
|
456
|
+
return 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
let count = 0;
|
|
460
|
+
const visit = (current) => {
|
|
461
|
+
for (const entry of readdirSync(current, { withFileTypes: true })) {
|
|
462
|
+
const fullPath = join(current, entry.name);
|
|
463
|
+
if (entry.isDirectory()) visit(fullPath);
|
|
464
|
+
else if (entry.isFile() && entry.name === 'manifest.json') count += 1;
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
visit(directory);
|
|
469
|
+
return count;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function listBundledSkillNames(rootDir) {
|
|
473
|
+
const source = join(rootDir, 'docs', 'skill-candidates');
|
|
474
|
+
if (!existsSync(source)) {
|
|
475
|
+
return [];
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const entries = readdirSync(source, { withFileTypes: true });
|
|
479
|
+
const directSkills = entries
|
|
480
|
+
.filter((entry) => entry.isDirectory() && existsSync(join(source, entry.name, 'SKILL.md')))
|
|
481
|
+
.map((entry) => entry.name);
|
|
482
|
+
|
|
483
|
+
if (directSkills.length) {
|
|
484
|
+
return Array.from(new Set(directSkills)).sort();
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return Array.from(new Set(
|
|
488
|
+
entries
|
|
489
|
+
.filter((entry) => entry.isDirectory())
|
|
490
|
+
.flatMap((entry) => {
|
|
491
|
+
const versionPath = join(source, entry.name);
|
|
492
|
+
return readdirSync(versionPath, { withFileTypes: true })
|
|
493
|
+
.filter((skillEntry) => skillEntry.isDirectory() && existsSync(join(versionPath, skillEntry.name, 'SKILL.md')))
|
|
494
|
+
.map((skillEntry) => skillEntry.name);
|
|
495
|
+
}),
|
|
496
|
+
)).sort();
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
function inspectBundledSkillCatalog(rootDir) {
|
|
500
|
+
const names = listBundledSkillNames(rootDir);
|
|
501
|
+
const categories = BUNDLED_SKILL_DOMAIN_GROUPS.map((group) => ({
|
|
502
|
+
key: group.key,
|
|
503
|
+
label: group.label,
|
|
504
|
+
count: group.skills.filter((skill) => names.includes(skill)).length,
|
|
505
|
+
}));
|
|
506
|
+
|
|
507
|
+
return {
|
|
508
|
+
total: names.length,
|
|
509
|
+
names,
|
|
510
|
+
categories,
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function formatBundledCategoryLine(catalog) {
|
|
515
|
+
if (!catalog?.categories?.length) {
|
|
516
|
+
return 'bundled skills: 0';
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return catalog.categories
|
|
520
|
+
.filter((category) => category.count > 0)
|
|
521
|
+
.map((category) => `${category.label} ${category.count}`)
|
|
522
|
+
.join(' | ');
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
function resolveCommandArea(action) {
|
|
526
|
+
if (!action) {
|
|
527
|
+
return 'geral';
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
return COMMAND_AREA_LABELS[action.key] ?? 'geral';
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function formatActionCommand(action) {
|
|
534
|
+
if (!action?.command) {
|
|
535
|
+
return '';
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
return [action.command, ...(action.args ?? [])].join(' ');
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function resolveNpmCommand(nodeExecPath) {
|
|
542
|
+
if (process.platform !== 'win32') {
|
|
543
|
+
return { command: 'npm', argsPrefix: [], shell: false };
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const candidates = [
|
|
547
|
+
process.env.npm_execpath,
|
|
548
|
+
join(dirname(nodeExecPath), 'node_modules', 'npm', 'bin', 'npm-cli.js'),
|
|
549
|
+
].filter(Boolean);
|
|
550
|
+
const npmCli = candidates.find((candidate) => existsSync(candidate));
|
|
551
|
+
|
|
552
|
+
if (npmCli) {
|
|
553
|
+
return { command: nodeExecPath, argsPrefix: [npmCli], shell: false };
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
return { command: 'npm.cmd', argsPrefix: [], shell: true };
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process.execPath, invocationCwd = process.cwd() }) {
|
|
560
|
+
const isDevCheckout = existsSync(join(rootDir, 'tsconfig.json')) && existsSync(join(rootDir, 'src'));
|
|
561
|
+
const repoOnlyReason = 'Disponivel apenas no clone de desenvolvimento; no pacote npm use Doctor ou Status.';
|
|
562
|
+
const npmCommand = resolveNpmCommand(nodeExecPath);
|
|
563
|
+
|
|
564
|
+
return [
|
|
565
|
+
{
|
|
566
|
+
key: 'status',
|
|
567
|
+
aliases: ['status'],
|
|
568
|
+
label: 'Status local',
|
|
569
|
+
description: 'Mostra versao local, manifesto e informacoes do pacote.',
|
|
570
|
+
details: ['Nao altera arquivos.', 'Use para confirmar se o menu esta lendo a instalacao correta.'],
|
|
571
|
+
success: 'Relatorio impresso com versao, canal, skills globais e clientes configurados.',
|
|
572
|
+
command: nodeExecPath,
|
|
573
|
+
args: [currentFile, '--status'],
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
key: 'doctor',
|
|
577
|
+
aliases: ['doctor', 'diagnostico', 'verificar-menu', 'validar-menu'],
|
|
578
|
+
label: 'Doctor do menu e clientes MCP',
|
|
579
|
+
description: 'Valida pacote, binarios, skills globais e registros em Codex, Claude Desktop, Claude Code, Gemini e Antigravity.',
|
|
580
|
+
details: ['Seguro para outros notebooks.', 'Nao publica versao e nao mexe em configuracoes sem uma acao separada.'],
|
|
581
|
+
success: 'Mostra um relatorio GO/NO-GO com proximos comandos recomendados.',
|
|
582
|
+
command: nodeExecPath,
|
|
583
|
+
args: [join(rootDir, 'bin', 'skill-master-doctor.mjs')],
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
key: 'check',
|
|
587
|
+
aliases: ['check', 'gate'],
|
|
588
|
+
label: 'Rodar gate completo',
|
|
589
|
+
description: 'Executa build, testes e validacao de manifestos.',
|
|
590
|
+
details: ['Exige clone do repositorio com src, testes e tsconfig.', 'Nao e uma acao indicada para instalacao global via npm.'],
|
|
591
|
+
success: 'Build, testes e manifestos passam no checkout de desenvolvimento.',
|
|
592
|
+
disabledReason: isDevCheckout ? null : repoOnlyReason,
|
|
593
|
+
command: npmCommand.command,
|
|
594
|
+
args: [...npmCommand.argsPrefix, 'run', 'check'],
|
|
595
|
+
shell: npmCommand.shell,
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
key: 'build',
|
|
599
|
+
aliases: ['build'],
|
|
600
|
+
label: 'Rodar build',
|
|
601
|
+
description: 'Compila o projeto localmente.',
|
|
602
|
+
details: ['Exige clone do repositorio com tsconfig.', 'Pacotes npm publicados ja usam dist precompilado.'],
|
|
603
|
+
success: 'dist atualizado no checkout de desenvolvimento.',
|
|
604
|
+
disabledReason: isDevCheckout ? null : repoOnlyReason,
|
|
605
|
+
command: npmCommand.command,
|
|
606
|
+
args: [...npmCommand.argsPrefix, 'run', 'build'],
|
|
607
|
+
shell: npmCommand.shell,
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
key: 'publicNpm',
|
|
611
|
+
aliases: ['public-npm', 'npm', 'registry'],
|
|
612
|
+
label: 'Validar pacote no npm publico',
|
|
613
|
+
description: 'Consulta a versao publicada em registry.npmjs.org.',
|
|
614
|
+
details: ['Usa somente leitura no registry publico.', 'Bom para confirmar se outro notebook consegue instalar por npm.'],
|
|
615
|
+
success: 'Retorna a versao publicada atualmente no npmjs.',
|
|
616
|
+
command: npmCommand.command,
|
|
617
|
+
args: [
|
|
618
|
+
...npmCommand.argsPrefix,
|
|
619
|
+
'view',
|
|
620
|
+
'@fprad0/skill-master-mcp',
|
|
621
|
+
'version',
|
|
622
|
+
'--registry=https://registry.npmjs.org',
|
|
623
|
+
],
|
|
624
|
+
shell: npmCommand.shell,
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
key: 'updateGlobal',
|
|
628
|
+
aliases: ['update', 'update-global'],
|
|
629
|
+
label: 'Atualizar pacote global via npm',
|
|
630
|
+
description: 'Atualiza a instalacao global e exige reinicio do cliente MCP.',
|
|
631
|
+
details: [
|
|
632
|
+
'A atualizacao deve ser feita fora do processo MCP stdio.',
|
|
633
|
+
'Se o menu estiver usando o pacote global no Windows, o fluxo faz handoff seguro em vez de atualizar a pasta em uso.',
|
|
634
|
+
'Use antes de abrir Codex, Claude, Gemini ou Antigravity.',
|
|
635
|
+
],
|
|
636
|
+
success: 'Pacote global atualizado para a versao latest do npm publico.',
|
|
637
|
+
command: nodeExecPath,
|
|
638
|
+
args: [join(rootDir, 'bin', 'skill-master-update.mjs')],
|
|
639
|
+
confirmMessage: 'Atualizar o pacote global agora?',
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
key: 'privateRegistry',
|
|
643
|
+
aliases: ['private-registry', 'private', 'github-packages'],
|
|
644
|
+
label: 'Configurar registry privado GitHub Packages',
|
|
645
|
+
description: 'Prepara o .npmrc e valida o acesso ao pacote privado.',
|
|
646
|
+
details: ['Uso avancado para ambientes privados.', 'Nao e necessario para o pacote publico do npmjs.'],
|
|
647
|
+
success: '.npmrc configurado e validacao npm view executada.',
|
|
648
|
+
command: nodeExecPath,
|
|
649
|
+
args: ['scripts/configure-private-registry.mjs', '--validate'],
|
|
650
|
+
confirmMessage: 'Rodar a configuracao de registry privado agora?',
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
key: 'activationStatus',
|
|
654
|
+
aliases: ['activation-status', 'modo', 'modo-ativacao'],
|
|
655
|
+
label: 'Modo de ativacao atual',
|
|
656
|
+
description: 'Mostra o modo manual, balanced ou always-on-assisted configurado localmente.',
|
|
657
|
+
details: ['Nao altera configuracao.', 'Ajuda a entender quando o Skill Master deve sugerir skills.'],
|
|
658
|
+
success: 'Modo atual e caminho da configuracao impressos no terminal.',
|
|
659
|
+
command: nodeExecPath,
|
|
660
|
+
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--status'],
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
key: 'activationBalanced',
|
|
664
|
+
aliases: ['set-balanced', 'balanced'],
|
|
665
|
+
label: 'Usar modo balanced',
|
|
666
|
+
description: 'Define balanced como modo padrao de ativacao do Skill Master.',
|
|
667
|
+
details: ['Recomendado para uso diario.', 'Ativa o MCP quando ha ganho claro para o prompt.'],
|
|
668
|
+
success: 'Modo balanced salvo localmente.',
|
|
669
|
+
command: nodeExecPath,
|
|
670
|
+
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--set-mode', 'balanced'],
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
key: 'activationAlwaysOn',
|
|
674
|
+
aliases: ['set-always-on', 'always-on-assisted'],
|
|
675
|
+
label: 'Usar modo always-on-assisted',
|
|
676
|
+
description: 'Define avaliacao assistida quase sempre ativa, mantendo no-op quando nao houver ganho.',
|
|
677
|
+
details: ['Mais agressivo que balanced.', 'Indicado para usuarios que querem o Skill Master avaliando quase todos os prompts.'],
|
|
678
|
+
success: 'Modo always-on-assisted salvo localmente.',
|
|
679
|
+
command: nodeExecPath,
|
|
680
|
+
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--set-mode', 'always-on-assisted'],
|
|
681
|
+
confirmMessage: 'Alterar o modo local para always-on-assisted?',
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
key: 'installGlobalSkills',
|
|
685
|
+
aliases: ['install-global-skills', 'skills-globais', 'global-skills'],
|
|
686
|
+
label: 'Instalar skills globais do Skill Master',
|
|
687
|
+
description: 'Copia as skills amplas e morais embutidas para CODEX_HOME/skills ou ~/.codex/skills.',
|
|
688
|
+
details: ['Necessario para Codex descobrir as skills globais.', 'Pode ser reexecutado com seguranca pelo bootstrap.'],
|
|
689
|
+
success: 'Skills globais copiadas para a pasta global do usuario.',
|
|
690
|
+
command: nodeExecPath,
|
|
691
|
+
args: [join(rootDir, 'bin', 'skill-master-install-global-skills.mjs')],
|
|
692
|
+
confirmMessage: 'Instalar as skills globais embutidas neste usuario?',
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
key: 'installProjectSkills',
|
|
696
|
+
aliases: ['install-project-skills', 'skills-projeto', 'project-skills', 'agents-skills'],
|
|
697
|
+
label: 'Instalar skills no projeto atual',
|
|
698
|
+
description: 'Copia o bundle para .agents/skills, .codex/skills, .claude/skills e .gemini/skills do projeto onde o menu foi aberto.',
|
|
699
|
+
details: ['Registra .skill-master/catalog.json e metadados em package.json quando existir.', `Projeto alvo: ${invocationCwd}`],
|
|
700
|
+
success: 'Skills de projeto copiadas e catalogo local atualizado.',
|
|
701
|
+
command: nodeExecPath,
|
|
702
|
+
args: [join(rootDir, 'bin', 'skill-master-install-project-skills.mjs'), '--project-root', invocationCwd, '--sync-package-json'],
|
|
703
|
+
cwd: invocationCwd,
|
|
704
|
+
confirmMessage: 'Instalar e catalogar as skills do Skill Master no projeto atual?',
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
key: 'bootstrapGlobal',
|
|
708
|
+
aliases: ['bootstrap-global', 'global-bootstrap', 'ativar-global-completo'],
|
|
709
|
+
label: 'Ativar MCP global neste computador',
|
|
710
|
+
description: 'Instala skills globais e registra Codex, Claude, Gemini e Antigravity no mesmo passo.',
|
|
711
|
+
details: ['Acao principal para notebooks novos.', 'Depois reinicie os clientes para eles recarregarem MCP e skills.'],
|
|
712
|
+
success: 'Skills instaladas e configuracoes MCP aplicadas nos clientes encontrados.',
|
|
713
|
+
command: nodeExecPath,
|
|
714
|
+
args: [join(rootDir, 'bin', 'skill-master-bootstrap-global.mjs')],
|
|
715
|
+
confirmMessage: 'Executar o bootstrap global do Skill Master neste computador?',
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
key: 'registerClients',
|
|
719
|
+
aliases: ['register-clients', 'registrar-clientes', 'codex-claude-gemini', 'antigravity'],
|
|
720
|
+
label: 'Registrar clientes MCP',
|
|
721
|
+
description: 'Gera/aplica configuracoes MCP para Codex, Claude Desktop, Claude Code, Gemini e Antigravity reconhecerem skill_master.',
|
|
722
|
+
details: ['Usa Node absoluto e o entrypoint absoluto do pacote.', 'Claude Code e registrado via claude mcp add quando o CLI esta disponivel.'],
|
|
723
|
+
success: 'Arquivos de configuracao mesclados com o servidor skill_master.',
|
|
724
|
+
command: nodeExecPath,
|
|
725
|
+
args: [join(rootDir, 'bin', 'skill-master-register-clients.mjs'), '--apply-all'],
|
|
726
|
+
confirmMessage: 'Aplicar registro do skill_master em Codex, Claude, Gemini e Antigravity?',
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
key: 'promptRecommendation',
|
|
730
|
+
aliases: ['recommend-prompt', 'recomendar-prompt', 'prompt-router'],
|
|
731
|
+
label: 'Ver recomendacao para um prompt',
|
|
732
|
+
description: 'Abre um fluxo interativo para avaliar um prompt pelo router local.',
|
|
733
|
+
details: ['Ajuda a decidir se skill-master, skill_master ou skill-master-mcp deve agir.', 'Nao publica nem altera skills.'],
|
|
734
|
+
success: 'Router imprime recomendacao, modo de ativacao e gates aplicaveis.',
|
|
735
|
+
effect: 'read-only',
|
|
736
|
+
risk: 'low',
|
|
737
|
+
requiresTty: true,
|
|
738
|
+
automationHint: 'skill-master-menu --run prompt-router --prompt "seu prompt".',
|
|
739
|
+
command: nodeExecPath,
|
|
740
|
+
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--route-prompt-interactive'],
|
|
741
|
+
cwd: invocationCwd,
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
key: 'successNotifications',
|
|
745
|
+
aliases: ['notifications', 'notificacoes', 'success-notifications'],
|
|
746
|
+
label: 'Notificacoes de skills aprendidas',
|
|
747
|
+
description: 'Mostra drafts pendentes, aprovacoes e skills externas para estudar.',
|
|
748
|
+
details: ['Use para decidir o que aprovar, estudar ou rejeitar.', 'Nao ativa skill automaticamente.'],
|
|
749
|
+
success: 'Lista de pendencias e proximas acoes exibida.',
|
|
750
|
+
command: nodeExecPath,
|
|
751
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--notify'],
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
key: 'studySkills',
|
|
755
|
+
aliases: ['study-skills', 'skills-estudo', 'estudar'],
|
|
756
|
+
label: 'Skills para estudar',
|
|
757
|
+
description: 'Lista skills externas e links de criadores ainda nao aprovados.',
|
|
758
|
+
details: ['Material de estudo, nao ativacao operacional.', 'Bom para revisao humana antes de virar skill local/global.'],
|
|
759
|
+
success: 'Links e motivos de estudo exibidos.',
|
|
760
|
+
command: nodeExecPath,
|
|
761
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--study'],
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
key: 'approvalPackage',
|
|
765
|
+
aliases: ['approval-package', 'aprovar', 'pacote-aprovacao'],
|
|
766
|
+
label: 'Gerar pacote de aprovacao humana',
|
|
767
|
+
description: 'Cria um relatorio local para revisar e aprovar skills aprendidas.',
|
|
768
|
+
details: ['Exige decisao humana antes de ativacao.', 'Inclui riscos, evidencias e recomendacao.'],
|
|
769
|
+
success: 'Pacote local de aprovacao gerado.',
|
|
770
|
+
effect: 'writes-local',
|
|
771
|
+
risk: 'medium',
|
|
772
|
+
command: nodeExecPath,
|
|
773
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--approval-package'],
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
key: 'markLearnedStudy',
|
|
777
|
+
aliases: ['mark-study', 'manter-estudo'],
|
|
778
|
+
label: 'Manter skill candidata para estudo',
|
|
779
|
+
description: 'Seleciona uma candidata e registra decisao de manter para estudo.',
|
|
780
|
+
details: ['Preserva historico sem ativar a skill.', 'Use quando a fonte ainda precisa revisao.'],
|
|
781
|
+
success: 'Decisao registrada no historico local.',
|
|
782
|
+
command: nodeExecPath,
|
|
783
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--mark-study-interactive'],
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
key: 'rejectLearnedSkill',
|
|
787
|
+
aliases: ['reject-skill', 'rejeitar-skill'],
|
|
788
|
+
label: 'Rejeitar skill candidata',
|
|
789
|
+
description: 'Seleciona uma candidata, registra rejeicao e preserva historico.',
|
|
790
|
+
details: ['Nao apaga evidencias.', 'Use quando risco, fonte ou utilidade nao passam no gate.'],
|
|
791
|
+
success: 'Rejeicao registrada com motivo.',
|
|
792
|
+
command: nodeExecPath,
|
|
793
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--reject-interactive'],
|
|
794
|
+
confirmMessage: 'Abrir fluxo para rejeitar uma skill candidata?',
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
key: 'activateLearnedLocal',
|
|
798
|
+
aliases: ['activate-learned-local', 'ativar-local', 'skill-local'],
|
|
799
|
+
label: 'Ativar skill aprendida no workspace',
|
|
800
|
+
description: 'Instala uma skill aprendida em .codex/skills do projeto atual.',
|
|
801
|
+
details: ['Escopo limitado ao workspace.', 'Mais conservador que ativar globalmente.'],
|
|
802
|
+
success: 'Skill copiada para .codex/skills do projeto.',
|
|
803
|
+
effect: 'writes-local',
|
|
804
|
+
risk: 'medium',
|
|
805
|
+
requiresTty: true,
|
|
806
|
+
automationHint: 'use --manifest <manifest.json> --yes ou --yes quando houver exatamente um draft pronto.',
|
|
807
|
+
command: nodeExecPath,
|
|
808
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--activate-interactive', '--target', 'local'],
|
|
809
|
+
cwd: invocationCwd,
|
|
810
|
+
confirmMessage: 'Selecionar e ativar uma skill aprendida no workspace atual?',
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
key: 'activateLearnedGlobal',
|
|
814
|
+
aliases: ['activate-learned-global', 'ativar-global', 'skill-global'],
|
|
815
|
+
label: 'Ativar skill aprendida global',
|
|
816
|
+
description: 'Instala uma skill aprendida em CODEX_HOME/skills ou ~/.codex/skills.',
|
|
817
|
+
details: ['Afeta todos os projetos deste usuario.', 'Use apenas depois de aprovacao humana.'],
|
|
818
|
+
success: 'Skill instalada no diretorio global de skills.',
|
|
819
|
+
effect: 'writes-global',
|
|
820
|
+
risk: 'high',
|
|
821
|
+
requiresTty: true,
|
|
822
|
+
automationHint: 'use --manifest <manifest.json> --yes ou --yes quando houver exatamente um draft pronto.',
|
|
823
|
+
command: nodeExecPath,
|
|
824
|
+
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--activate-interactive', '--target', 'global'],
|
|
825
|
+
cwd: invocationCwd,
|
|
826
|
+
confirmMessage: 'Selecionar e ativar uma skill aprendida como skill global deste usuario?',
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
key: 'notionSummary',
|
|
830
|
+
aliases: ['notion-summary', 'resumo-notion'],
|
|
831
|
+
label: 'Abrir resumo para Notion',
|
|
832
|
+
description: 'Mostra um resumo copiavel do estado de ativacao para registrar no ledger Notion.',
|
|
833
|
+
details: ['Nao escreve no Notion sozinho.', 'Gera texto de continuidade para documentacao.'],
|
|
834
|
+
success: 'Resumo pronto para registro exibido.',
|
|
835
|
+
command: nodeExecPath,
|
|
836
|
+
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--notion-summary'],
|
|
837
|
+
},
|
|
838
|
+
];
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export function buildMenuChoices(commands) {
|
|
842
|
+
return commands.map((command) => ({
|
|
843
|
+
title: command.label,
|
|
844
|
+
description: [command.description, command.success ? `Resultado: ${command.success}` : null].filter(Boolean).join(' '),
|
|
845
|
+
value: command.key,
|
|
846
|
+
disabled: command.disabledReason ?? false,
|
|
847
|
+
})).concat({
|
|
848
|
+
title: 'Sair',
|
|
849
|
+
description: 'Fecha o menu operacional.',
|
|
850
|
+
value: '__exit__',
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export function resolveInitialSelectedIndex(status, commands) {
|
|
855
|
+
if (!status?.globalReadiness?.ready) {
|
|
856
|
+
const bootstrapIndex = commands.findIndex((command) => command.key === 'bootstrapGlobal');
|
|
857
|
+
if (bootstrapIndex >= 0) return bootstrapIndex;
|
|
858
|
+
}
|
|
859
|
+
return 0;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
export function resolveActionKey(input, commands) {
|
|
863
|
+
const normalized = (input ?? '').trim().toLowerCase();
|
|
864
|
+
if (!normalized) {
|
|
865
|
+
return null;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
return commands.find((command) =>
|
|
869
|
+
command.key.toLowerCase() === normalized || command.aliases.includes(normalized),
|
|
870
|
+
)?.key ?? null;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export function isInteractiveTerminal() {
|
|
874
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
export function formatStatusReport(status) {
|
|
878
|
+
const readiness = status.globalReadiness;
|
|
879
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
880
|
+
const lines = [
|
|
881
|
+
'Skill Master MCP - status local',
|
|
882
|
+
`Diretorio: ${status.rootDir}`,
|
|
883
|
+
`Pacote: ${status.packageName}`,
|
|
884
|
+
`Semver local: ${status.semver}`,
|
|
885
|
+
`Manifesto stable: ${status.manifestVersion}`,
|
|
886
|
+
`Manifesto semver: ${status.manifestSemver}`,
|
|
887
|
+
`Drafts de skills aprendidas: ${status.pendingSuccessDrafts}`,
|
|
888
|
+
`Skills externas para estudar: ${status.studyCandidates}`,
|
|
889
|
+
`Global readiness: ${readiness.ready ? 'pronto' : readiness.mode}`,
|
|
890
|
+
`Global skills instaladas: ${readiness.installed.length}/${readiness.required}`,
|
|
891
|
+
`Bundle de skills embutidas: ${bundledCatalog.total}`,
|
|
892
|
+
`Dominios do bundle: ${formatBundledCategoryLine(bundledCatalog)}`,
|
|
893
|
+
`Codex MCP robusto: ${readiness.codex.globalCommand ? 'sim' : readiness.codex.kind}`,
|
|
894
|
+
`Claude MCP robusto: ${readiness.claude.globalCommand ? 'sim' : readiness.claude.present ? readiness.claude.kind : 'ausente'}`,
|
|
895
|
+
`Gemini MCP robusto: ${readiness.gemini.globalCommand ? 'sim' : readiness.gemini.present ? readiness.gemini.kind : 'ausente'}`,
|
|
896
|
+
`Antigravity MCP robusto: ${readiness.antigravity.globalCommand ? 'sim' : readiness.antigravity.present ? readiness.antigravity.kind : 'ausente'}`,
|
|
897
|
+
];
|
|
898
|
+
|
|
899
|
+
if (status.versionText) {
|
|
900
|
+
lines.push('', 'VERSION.md:');
|
|
901
|
+
lines.push(...status.versionText.split('\n').slice(0, 6));
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
return lines.join('\n');
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
function formatGlobalAlert(status, { useColor = false } = {}) {
|
|
908
|
+
const readiness = status.globalReadiness;
|
|
909
|
+
if (readiness.ready) {
|
|
910
|
+
return renderPanelLines(
|
|
911
|
+
[
|
|
912
|
+
colorize('GLOBAL READY', ANSI.bold, useColor),
|
|
913
|
+
'O MCP esta registrado com Node absoluto neste computador.',
|
|
914
|
+
'Codex, Claude Desktop, Claude Code, Gemini e Antigravity podem iniciar o servidor sem depender do PATH.',
|
|
915
|
+
'A instalacao global e as skills embutidas ja estao prontas para uso.',
|
|
916
|
+
],
|
|
917
|
+
{ color: ANSI.green, useColor },
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
return [
|
|
922
|
+
renderPanelLines(
|
|
923
|
+
[
|
|
924
|
+
colorize('ALERTA GLOBAL', ANSI.bold, useColor),
|
|
925
|
+
'Este computador ainda nao esta pronto para uso robusto do Skill Master.',
|
|
926
|
+
'Execute agora: skill-master-menu --run bootstrap-global --yes',
|
|
927
|
+
'Isso instala as skills globais e registra Codex, Claude Desktop, Claude Code, Gemini e Antigravity com Node absoluto.',
|
|
928
|
+
'Ou migre somente os clientes: skill-master-register-clients --apply-all --force',
|
|
929
|
+
],
|
|
930
|
+
{ color: ANSI.red, useColor },
|
|
931
|
+
),
|
|
932
|
+
renderPanelLines(
|
|
933
|
+
[
|
|
934
|
+
colorize('AVISO SUTIL', ANSI.dim, useColor),
|
|
935
|
+
'Sem instalacao global, o MCP continua util localmente, mas nao fica integrado como parte do sistema em todos os clientes.',
|
|
936
|
+
`Skills globais detectadas: ${readiness.installed.length}/${readiness.required}`,
|
|
937
|
+
],
|
|
938
|
+
{ color: ANSI.yellow, useColor },
|
|
939
|
+
),
|
|
940
|
+
].join('\n\n');
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
function renderPanelLines(lines, { color = ANSI.cyan, useColor = false } = {}) {
|
|
944
|
+
const width = Math.max(...lines.map((line) => visibleLength(line)), 24) + 4;
|
|
945
|
+
return renderCyberFrame(
|
|
946
|
+
lines.map((line) => fitText(line, width - 4)),
|
|
947
|
+
width,
|
|
948
|
+
'skill-master',
|
|
949
|
+
{ color, useColor, style: 'data' },
|
|
950
|
+
).join('\n');
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
function patternFill(pattern, width) {
|
|
954
|
+
if (width <= 0) return '';
|
|
955
|
+
return Array.from({ length: Math.ceil(width / pattern.length) }, () => pattern).join('').slice(0, width);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
function frameTokens(style, glyphSet = resolveGlyphSet()) {
|
|
959
|
+
if (glyphSet.ascii) {
|
|
960
|
+
if (style === 'running') {
|
|
961
|
+
return { topLeft: '+-', topRight: '-+', bottomLeft: '+-', bottomRight: '-+', fill: '=', left: '||', right: '||', accent: '#', micro: '.' };
|
|
962
|
+
}
|
|
963
|
+
return { topLeft: '+-', topRight: '-+', bottomLeft: '+-', bottomRight: '-+', fill: style === 'focus' ? '=' : '-', left: '| ', right: ' |', accent: '#', micro: '.' };
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
if (style === 'focus') {
|
|
967
|
+
return { topLeft: '╭╼', topRight: '╾╮', bottomLeft: '╰╼', bottomRight: '╾╯', fill: '═', left: '▌ ', right: ' ▐', accent: '▰', micro: '▱' };
|
|
968
|
+
}
|
|
969
|
+
if (style === 'hud') {
|
|
970
|
+
return { topLeft: '┏╾', topRight: '╼┓', bottomLeft: '┗╾', bottomRight: '╼┛', fill: '─', left: '▌ ', right: ' ▐', accent: '▰', micro: '▱' };
|
|
971
|
+
}
|
|
972
|
+
if (style === 'running') {
|
|
973
|
+
return { topLeft: '╔╼', topRight: '╾╗', bottomLeft: '╚╼', bottomRight: '╾╝', fill: '═', left: '▌▌', right: '▐▐', accent: '▰', micro: '▱' };
|
|
974
|
+
}
|
|
975
|
+
if (style === 'thin') {
|
|
976
|
+
return { topLeft: '┌╴', topRight: '╶┐', bottomLeft: '└╴', bottomRight: '╶┘', fill: '─', left: '│ ', right: ' │', accent: '▱', micro: '╍' };
|
|
977
|
+
}
|
|
978
|
+
return { topLeft: '╭╴', topRight: '╶╮', bottomLeft: '╰╴', bottomRight: '╶╯', fill: '─', left: '│ ', right: ' │', accent: '▰', micro: '▱' };
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
function fillWithPattern(text, width, fill) {
|
|
982
|
+
const length = visibleLength(text);
|
|
983
|
+
if (length >= width) return fitText(text, width);
|
|
984
|
+
return `${text}${patternFill(fill, width - length)}`;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function renderCyberRail(width, title, tokens, { bottom = false, tick = 0 } = {}) {
|
|
988
|
+
const left = bottom ? tokens.bottomLeft : tokens.topLeft;
|
|
989
|
+
const right = bottom ? tokens.bottomRight : tokens.topRight;
|
|
990
|
+
const innerWidth = Math.max(0, width - visibleLength(left) - visibleLength(right));
|
|
991
|
+
const phaseMicro = tick % 2 === 0 ? tokens.micro : tokens.fill;
|
|
992
|
+
const titleText = !bottom && title ? ` ${String(title).toUpperCase()} ` : '';
|
|
993
|
+
const titleWidth = titleText ? Math.min(visibleLength(titleText), Math.max(0, innerWidth - 8)) : 0;
|
|
994
|
+
const safeTitle = titleText ? fitText(titleText, titleWidth).trimEnd() : '';
|
|
995
|
+
|
|
996
|
+
if (bottom) {
|
|
997
|
+
const lead = patternFill(tokens.fill, Math.max(2, Math.floor(innerWidth * 0.18)));
|
|
998
|
+
const plate = innerWidth >= 34 ? `${tokens.accent}${tokens.accent}${tokens.accent}` : tokens.accent;
|
|
999
|
+
const vent = innerWidth >= 44 ? patternFill(`${phaseMicro}${tokens.fill}`, 8) : '';
|
|
1000
|
+
return `${left}${fillWithPattern(`${lead}${plate}${tokens.fill}${vent}`, innerWidth, tokens.fill)}${right}`;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
const leadWidth = Math.max(2, Math.min(10, Math.floor(innerWidth * 0.16)));
|
|
1004
|
+
const lead = patternFill(tokens.fill, leadWidth);
|
|
1005
|
+
const chip = innerWidth >= 36 ? `${tokens.accent}${phaseMicro}${phaseMicro}` : tokens.accent;
|
|
1006
|
+
const tab = innerWidth >= 48 ? `${tokens.fill}${tokens.fill}${tokens.accent}${tokens.fill}` : tokens.fill;
|
|
1007
|
+
return `${left}${fillWithPattern(`${lead}${safeTitle}${chip}${tab}`, innerWidth, tokens.fill)}${right}`;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
function renderCyberFrame(lines, width, title, { useColor = false, color = ANSI.cyan, style = 'data', tick = 0, glyphSet = resolveGlyphSet() } = {}) {
|
|
1011
|
+
const safeWidth = Math.max(16, width);
|
|
1012
|
+
const innerWidth = safeWidth - 4;
|
|
1013
|
+
const tokens = frameTokens(style, glyphSet);
|
|
1014
|
+
const top = renderCyberRail(safeWidth, title, tokens, { tick });
|
|
1015
|
+
const bottom = renderCyberRail(safeWidth, title, tokens, { bottom: true, tick });
|
|
1016
|
+
const body = lines.map((line, index) => {
|
|
1017
|
+
const marker = style === 'running' && index % 3 === Math.abs(tick % 3)
|
|
1018
|
+
? tokens.accent
|
|
1019
|
+
: index === 0 || index === lines.length - 1
|
|
1020
|
+
? tokens.micro
|
|
1021
|
+
: ' ';
|
|
1022
|
+
const content = fitText(`${marker}${truncateVisibleText(line, Math.max(0, innerWidth - 1))}`, innerWidth);
|
|
1023
|
+
return `${colorize(tokens.left, color, useColor)}${content}${colorize(tokens.right, color, useColor)}`;
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
return [
|
|
1027
|
+
colorize(top, color, useColor),
|
|
1028
|
+
...body,
|
|
1029
|
+
colorize(bottom, color, useColor),
|
|
1030
|
+
];
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
function renderCircuitRail(width, tick, { useColor = false, color = ANSI.teal } = {}) {
|
|
1034
|
+
const patterns = ['<==/==>--', '<=/===/>-', '<<==--==>', '<==\\==>--'];
|
|
1035
|
+
return colorize(patternFill(patterns[Math.abs(tick) % patterns.length], width), color, useColor);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
function renderScanGrid(width, height, tick, { useColor = false } = {}) {
|
|
1039
|
+
const lines = [];
|
|
1040
|
+
const scanCol = width > 0 ? tick % width : 0;
|
|
1041
|
+
const scanRow = height > 0 ? Math.floor(tick / 2) % height : 0;
|
|
1042
|
+
|
|
1043
|
+
for (let row = 0; row < height; row += 1) {
|
|
1044
|
+
const cells = Array.from({ length: width }, (_, col) => {
|
|
1045
|
+
if (row === scanRow && col % 3 === 0) return colorize('-', ANSI.white, useColor);
|
|
1046
|
+
if (col === scanCol && row % 2 === 0) return colorize('|', ANSI.teal, useColor);
|
|
1047
|
+
if ((row + col + tick) % 17 === 0) return colorize('+', ANSI.amber, useColor);
|
|
1048
|
+
if (row % 4 === 0 && col % 8 === 0) return colorize('.', ANSI.gray, useColor);
|
|
1049
|
+
return ' ';
|
|
1050
|
+
});
|
|
1051
|
+
lines.push(cells.join(''));
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
return lines;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const BRAILLE_DOTS = [
|
|
1058
|
+
[0x01, 0x02, 0x04, 0x40],
|
|
1059
|
+
[0x08, 0x10, 0x20, 0x80],
|
|
1060
|
+
];
|
|
1061
|
+
|
|
1062
|
+
function createBrailleCanvas(width, height) {
|
|
1063
|
+
return {
|
|
1064
|
+
width,
|
|
1065
|
+
height,
|
|
1066
|
+
dots: Array.from({ length: height }, () => Array.from({ length: width }, () => 0)),
|
|
1067
|
+
colors: Array.from({ length: height }, () => Array.from({ length: width }, () => 'gray')),
|
|
1068
|
+
priorities: Array.from({ length: height }, () => Array.from({ length: width }, () => -1)),
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
function plotBraille(canvas, x, y, color = 'gray', priority = 0) {
|
|
1073
|
+
if (x < 0 || y < 0) return;
|
|
1074
|
+
const cellX = Math.floor(x / 2);
|
|
1075
|
+
const cellY = Math.floor(y / 4);
|
|
1076
|
+
if (cellX < 0 || cellY < 0 || cellX >= canvas.width || cellY >= canvas.height) return;
|
|
1077
|
+
canvas.dots[cellY][cellX] |= BRAILLE_DOTS[x % 2][y % 4];
|
|
1078
|
+
if (priority >= canvas.priorities[cellY][cellX]) {
|
|
1079
|
+
canvas.colors[cellY][cellX] = color;
|
|
1080
|
+
canvas.priorities[cellY][cellX] = priority;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
function plotBrailleThick(canvas, x, y, radius = 0, color = 'gray', priority = 0) {
|
|
1085
|
+
for (let dy = -radius; dy <= radius; dy += 1) {
|
|
1086
|
+
for (let dx = -radius; dx <= radius; dx += 1) {
|
|
1087
|
+
if (Math.abs(dx) + Math.abs(dy) <= radius + 1) {
|
|
1088
|
+
plotBraille(canvas, x + dx, y + dy, color, priority);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
function drawBrailleLine(canvas, x0, y0, x1, y1, thickness = 0, color = 'gray', priority = 0) {
|
|
1095
|
+
const steps = Math.max(Math.abs(x1 - x0), Math.abs(y1 - y0), 1);
|
|
1096
|
+
for (let step = 0; step <= steps; step += 1) {
|
|
1097
|
+
const ratio = step / steps;
|
|
1098
|
+
const x = Math.round(x0 + (x1 - x0) * ratio);
|
|
1099
|
+
const y = Math.round(y0 + (y1 - y0) * ratio);
|
|
1100
|
+
plotBrailleThick(canvas, x, y, thickness, color, priority);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
function renderBrailleCanvas(canvas, { useColor = false, glyphSet = resolveGlyphSet() } = {}) {
|
|
1105
|
+
return canvas.dots.map((row, rowIndex) => row.map((value, colIndex) => {
|
|
1106
|
+
if (value === 0) return ' ';
|
|
1107
|
+
if (glyphSet.ascii) return glyphSet.brailleFilled;
|
|
1108
|
+
const color = ANSI[canvas.colors[rowIndex][colIndex]] ?? ANSI.teal;
|
|
1109
|
+
return colorize(String.fromCodePoint(0x2800 + value), color, useColor);
|
|
1110
|
+
}).join(''));
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
function renderStatusCapsule(label, value, width, { useColor = false, color = ANSI.teal } = {}) {
|
|
1114
|
+
return fitText(`${colorize(`[${label}]`, color, useColor)} ${value}`, width);
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
function summarizeClientReadiness(globalReadiness) {
|
|
1118
|
+
const states = [
|
|
1119
|
+
['cx', globalReadiness?.codex?.globalCommand],
|
|
1120
|
+
['cl', globalReadiness?.claude?.globalCommand],
|
|
1121
|
+
['gm', globalReadiness?.gemini?.globalCommand],
|
|
1122
|
+
['ag', globalReadiness?.antigravity?.globalCommand],
|
|
1123
|
+
];
|
|
1124
|
+
|
|
1125
|
+
return states
|
|
1126
|
+
.map(([label, ready]) => `${label}${ready ? '+' : '-'}`)
|
|
1127
|
+
.join(' ');
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export function formatMenuBanner(status, { useColor = false } = {}) {
|
|
1131
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
1132
|
+
const lines = [
|
|
1133
|
+
colorize('Skill Master MCP', ANSI.bold, useColor),
|
|
1134
|
+
'Menu operacional para manutencao local',
|
|
1135
|
+
`Versao local ${status.semver} | canal ${status.manifestVersion}`,
|
|
1136
|
+
`Pendencias: ${status.pendingSuccessDrafts} drafts | estudo: ${status.studyCandidates} links`,
|
|
1137
|
+
`Global: ${status.globalReadiness.ready ? 'pronto' : 'requer instalacao global'}`,
|
|
1138
|
+
`Bundle: ${bundledCatalog.total} skills | ${formatBundledCategoryLine(bundledCatalog)}`,
|
|
1139
|
+
colorize('Setas + Enter para navegar', ANSI.dim, useColor),
|
|
1140
|
+
];
|
|
1141
|
+
return [
|
|
1142
|
+
renderPanelLines(lines, { color: ANSI.cyan, useColor }),
|
|
1143
|
+
formatGlobalAlert(status, { useColor }),
|
|
1144
|
+
].join('\n\n');
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
function dnaPanelLines(tick, width, height, status, selected, { useColor = false, compact = false, glyphSet = resolveGlyphSet() } = {}) {
|
|
1148
|
+
const lines = [];
|
|
1149
|
+
const canvasWidth = Math.max(18, width);
|
|
1150
|
+
const canvasHeight = Math.max(compact ? 8 : 10, height - 4);
|
|
1151
|
+
const pixelWidth = canvasWidth * 2;
|
|
1152
|
+
const pixelHeight = canvasHeight * 4;
|
|
1153
|
+
const center = Math.floor(pixelWidth / 2);
|
|
1154
|
+
const amplitude = Math.max(7, Math.min(Math.floor(pixelWidth * 0.2), compact ? 10 : 15));
|
|
1155
|
+
const frameCount = 48;
|
|
1156
|
+
const frameRatio = (tick % frameCount) / frameCount;
|
|
1157
|
+
const phase = frameRatio * Math.PI * 2;
|
|
1158
|
+
const scanPhase = (1 - Math.cos(frameRatio * Math.PI * 2)) / 2;
|
|
1159
|
+
const pairEvery = compact ? 11 : 9;
|
|
1160
|
+
const actionArea = resolveCommandArea(selected);
|
|
1161
|
+
const canvas = createBrailleCanvas(canvasWidth, canvasHeight);
|
|
1162
|
+
|
|
1163
|
+
lines.push(fitText(colorize(`DNA CYBER HELIX / ${actionArea}`, ANSI.bold, useColor), width));
|
|
1164
|
+
lines.push(fitText(colorize(compact ? 'fine strand / focus' : 'luminous fine helix / low flicker', ANSI.dim, useColor), width));
|
|
1165
|
+
|
|
1166
|
+
const twist = compact ? 0.19 : 0.168;
|
|
1167
|
+
const xA = (y) => Math.round(center + Math.sin(y * twist + phase) * amplitude);
|
|
1168
|
+
const xB = (y) => Math.round(center - Math.sin(y * twist + phase) * amplitude);
|
|
1169
|
+
const frontA = (y) => Math.cos(y * twist + phase) >= 0;
|
|
1170
|
+
const scanY = Math.floor(scanPhase * Math.max(1, pixelHeight - 1));
|
|
1171
|
+
const pulse = 0.72 + ((Math.sin(phase * 2) + 1) / 2) * 0.18;
|
|
1172
|
+
|
|
1173
|
+
for (let y = 0; y < pixelHeight; y += 12) {
|
|
1174
|
+
plotBrailleThick(canvas, center, y, 0, 'gray', 0);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
for (let y = 0; y < pixelHeight; y += 1) {
|
|
1178
|
+
if (y % 10 === 0) {
|
|
1179
|
+
for (let x = 2; x < pixelWidth - 2; x += 10) {
|
|
1180
|
+
plotBraille(canvas, x, y, 'gray', 0);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
const a = xA(y);
|
|
1185
|
+
const b = xB(y);
|
|
1186
|
+
const previousA = xA(Math.max(0, y - 1));
|
|
1187
|
+
const previousB = xB(Math.max(0, y - 1));
|
|
1188
|
+
const active = Math.abs(y - scanY) <= 2;
|
|
1189
|
+
const nearA = frontA(y);
|
|
1190
|
+
const wave = y * twist + phase;
|
|
1191
|
+
const depthA = (Math.cos(wave) + 1) / 2;
|
|
1192
|
+
const depthB = 1 - depthA;
|
|
1193
|
+
const strandAWidth = Math.max(0, Math.min(1, Math.round(depthA * pulse)));
|
|
1194
|
+
const strandBWidth = Math.max(0, Math.min(1, Math.round(depthB * pulse)));
|
|
1195
|
+
const strandAColor = active ? 'white' : nearA ? 'rose' : 'violet';
|
|
1196
|
+
const strandBColor = active ? 'white' : nearA ? 'teal' : 'blue';
|
|
1197
|
+
const strandAPriority = active ? 7 : nearA ? 5 : 3;
|
|
1198
|
+
const strandBPriority = active ? 7 : nearA ? 3 : 5;
|
|
1199
|
+
|
|
1200
|
+
if (y > 0) {
|
|
1201
|
+
if (y % 3 === 0) {
|
|
1202
|
+
drawBrailleLine(canvas, previousA + (nearA ? -2 : 2), y - 1, a + (nearA ? -2 : 2), y, 0, nearA ? 'gray' : 'blue', 1);
|
|
1203
|
+
drawBrailleLine(canvas, previousB + (nearA ? 2 : -2), y - 1, b + (nearA ? 2 : -2), y, 0, nearA ? 'blue' : 'gray', 1);
|
|
1204
|
+
}
|
|
1205
|
+
drawBrailleLine(canvas, previousA, y - 1, a, y, strandAWidth, strandAColor, strandAPriority);
|
|
1206
|
+
drawBrailleLine(canvas, previousB, y - 1, b, y, strandBWidth, strandBColor, strandBPriority);
|
|
1207
|
+
} else {
|
|
1208
|
+
plotBrailleThick(canvas, a, y, strandAWidth, strandAColor, strandAPriority);
|
|
1209
|
+
plotBrailleThick(canvas, b, y, strandBWidth, strandBColor, strandBPriority);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
if ((y + tick) % pairEvery === 0 || active) {
|
|
1213
|
+
const left = Math.min(a, b);
|
|
1214
|
+
const right = Math.max(a, b);
|
|
1215
|
+
const rungColor = active ? 'white' : nearA ? 'teal' : 'rose';
|
|
1216
|
+
const rungPriority = active ? 6 : 4;
|
|
1217
|
+
drawBrailleLine(canvas, left + 3, y, right - 3, y, 0, rungColor, rungPriority);
|
|
1218
|
+
for (let x = left + 3; x < right - 2; x += active ? 4 : 5) {
|
|
1219
|
+
plotBrailleThick(canvas, x, y, 0, rungColor, rungPriority);
|
|
1220
|
+
}
|
|
1221
|
+
plotBrailleThick(canvas, Math.round((left + right) / 2), y, active ? 1 : 0, active ? 'white' : 'amber', rungPriority + 1);
|
|
1222
|
+
plotBrailleThick(canvas, a, y, 0, strandAColor, strandAPriority + 1);
|
|
1223
|
+
plotBrailleThick(canvas, b, y, 0, strandBColor, strandBPriority + 1);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
for (const line of renderBrailleCanvas(canvas, { useColor, glyphSet })) {
|
|
1228
|
+
lines.push(line);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
lines.push(renderStatusCapsule('HELIX', `frames ${tick % frameCount}/${frameCount} | global ${status.globalReadiness.installed.length}/${status.globalReadiness.required}`, width, { useColor, color: ANSI.amber }));
|
|
1232
|
+
|
|
1233
|
+
return lines.slice(0, height).map((line) => fitText(line, width));
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
function renderMeterBar(value, total, width, { useColor = false, color = ANSI.teal, glyphSet = resolveGlyphSet() } = {}) {
|
|
1237
|
+
const safeTotal = Math.max(1, total);
|
|
1238
|
+
const safeValue = Math.max(0, Math.min(value, safeTotal));
|
|
1239
|
+
const fill = Math.round((safeValue / safeTotal) * width);
|
|
1240
|
+
const filled = glyphSet.meterFilled.repeat(fill);
|
|
1241
|
+
const empty = glyphSet.meterEmpty.repeat(Math.max(0, width - fill));
|
|
1242
|
+
return `${colorize(filled, color, useColor)}${colorize(empty, ANSI.gray, useColor)}`;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
function renderSparkline(series, { useColor = false, color = ANSI.teal, glyphSet = resolveGlyphSet() } = {}) {
|
|
1246
|
+
const blocks = glyphSet.sparkline;
|
|
1247
|
+
return series.map((value) => colorize(blocks[Math.max(0, Math.min(blocks.length - 1, value))], color, useColor)).join('');
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
function buildTelemetrySeries(seed, length, tick) {
|
|
1251
|
+
return Array.from({ length }, (_, index) => {
|
|
1252
|
+
const raw = Math.sin((index + 1 + seed) * 0.72 + tick * 0.18) + Math.cos((index + seed) * 0.33 + tick * 0.11);
|
|
1253
|
+
const normalized = Math.max(0, Math.min(1, (raw + 2) / 4));
|
|
1254
|
+
return Math.round(normalized * 7);
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
function buildOverviewSignalLine(status, width, tick, { useColor = false, compact = false, glyphSet = resolveGlyphSet() } = {}) {
|
|
1259
|
+
const signalWidth = Math.max(6, Math.min(compact ? 8 : 12, Math.floor(width / (compact ? 10 : 8))));
|
|
1260
|
+
const healthWidth = Math.max(6, Math.min(compact ? 8 : 12, Math.floor(width / (compact ? 10 : 8))));
|
|
1261
|
+
const signal = renderSparkline(
|
|
1262
|
+
buildTelemetrySeries(status.globalReadiness.installed.length + status.pendingSuccessDrafts, signalWidth, tick),
|
|
1263
|
+
{ useColor, color: ANSI.teal, glyphSet },
|
|
1264
|
+
);
|
|
1265
|
+
const health = renderSparkline(
|
|
1266
|
+
buildTelemetrySeries(status.studyCandidates + (status.globalReadiness.ready ? 7 : 3), healthWidth, tick + 3),
|
|
1267
|
+
{ useColor, color: ANSI.amber, glyphSet },
|
|
1268
|
+
);
|
|
1269
|
+
return compact
|
|
1270
|
+
? `signal ${signal} health ${health}`
|
|
1271
|
+
: `signal ${signal} health ${health}`;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
function telemetryPanelLines(status, selected, width, height, { useColor = false, tick = 0, compact = false, glyphSet = resolveGlyphSet() } = {}) {
|
|
1275
|
+
const commandArea = resolveCommandArea(selected);
|
|
1276
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
1277
|
+
const categoryLead = bundledCatalog.categories
|
|
1278
|
+
?.filter((category) => category.count > 0)
|
|
1279
|
+
.sort((left, right) => right.count - left.count)[0];
|
|
1280
|
+
const categoryName = categoryLead?.label ?? 'none';
|
|
1281
|
+
const categoryCount = categoryLead?.count ?? 0;
|
|
1282
|
+
const meterWidth = Math.max(8, Math.min(16, width - 14));
|
|
1283
|
+
const sparkWidth = Math.max(8, Math.min(compact ? 8 : 12, width - 18));
|
|
1284
|
+
const skillsSpark = renderSparkline(buildTelemetrySeries(status.globalReadiness.installed.length + categoryCount, sparkWidth, tick), { useColor, color: ANSI.amber, glyphSet });
|
|
1285
|
+
const draftsSpark = renderSparkline(buildTelemetrySeries(status.pendingSuccessDrafts + 2, sparkWidth, tick + 2), { useColor, color: ANSI.teal, glyphSet });
|
|
1286
|
+
const studySpark = renderSparkline(buildTelemetrySeries(status.studyCandidates + 4, sparkWidth, tick + 4), { useColor, color: ANSI.blue, glyphSet });
|
|
1287
|
+
const lines = [
|
|
1288
|
+
fitText(colorize('SYSTEM WINDOWS', ANSI.bold, useColor), width),
|
|
1289
|
+
renderStatusCapsule('AREA', commandArea, width, { useColor, color: ANSI.blue }),
|
|
1290
|
+
renderStatusCapsule('LEAD', `${categoryName} ${categoryCount}`, width, { useColor, color: ANSI.gray }),
|
|
1291
|
+
fitText(`bundle ${String(bundledCatalog.total).padStart(2, '0')} ${renderMeterBar(bundledCatalog.total, Math.max(36, bundledCatalog.total), meterWidth, { useColor, color: ANSI.white, glyphSet })}`, width),
|
|
1292
|
+
fitText(`global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} ${renderMeterBar(status.globalReadiness.installed.length, status.globalReadiness.required, meterWidth, { useColor, color: ANSI.amber, glyphSet })}`, width),
|
|
1293
|
+
renderStatusCapsule('LINK', summarizeClientReadiness(status.globalReadiness), width, { useColor, color: ANSI.teal }),
|
|
1294
|
+
fitText(`skills ${skillsSpark}`, width),
|
|
1295
|
+
fitText(`drafts ${String(status.pendingSuccessDrafts).padStart(2, '0')} ${renderMeterBar(status.pendingSuccessDrafts, Math.max(6, status.pendingSuccessDrafts || 1), meterWidth, { useColor, color: ANSI.teal, glyphSet })}`, width),
|
|
1296
|
+
fitText(`queue ${draftsSpark}`, width),
|
|
1297
|
+
fitText(`study ${String(status.studyCandidates).padStart(2, '0')} ${renderMeterBar(status.studyCandidates, Math.max(8, status.studyCandidates || 1), meterWidth, { useColor, color: ANSI.blue, glyphSet })}`, width),
|
|
1298
|
+
fitText(`links ${studySpark}`, width),
|
|
1299
|
+
fitText(colorize(compact ? 'codex / claude / gemini' : 'codex / claude / gemini / antigravity', ANSI.dim, useColor), width),
|
|
1300
|
+
];
|
|
1301
|
+
|
|
1302
|
+
return lines.slice(0, height).map((line) => fitText(line, width));
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
function cyberCorePanelLines(status, selected, width, height, { useColor = false, tick = 0, compact = false } = {}) {
|
|
1306
|
+
const actionArea = resolveCommandArea(selected);
|
|
1307
|
+
const gridHeight = Math.max(compact ? 4 : 6, height - (compact ? 5 : 6));
|
|
1308
|
+
const gridWidth = Math.max(12, width);
|
|
1309
|
+
const lines = [
|
|
1310
|
+
fitText(colorize('SKILL_MASTER CORE', ANSI.bold, useColor), width),
|
|
1311
|
+
fitText(colorize(compact ? 'cyber lattice / low flicker' : 'cyberpunk pixel art workflow engine', ANSI.dim, useColor), width),
|
|
1312
|
+
fitText(colorize(`area ${actionArea} | tick ${String(tick).padStart(3, '0')}`, ANSI.gray, useColor), width),
|
|
1313
|
+
fitText(renderCircuitRail(width, tick, { useColor, color: ANSI.teal }), width),
|
|
1314
|
+
...renderScanGrid(gridWidth, gridHeight, tick, { useColor }).map((line) => fitText(line, width)),
|
|
1315
|
+
fitText(renderCircuitRail(width, tick + 2, { useColor, color: ANSI.amber }), width),
|
|
1316
|
+
fitText(colorize(`global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} | bundle ${status.bundledCatalog?.total ?? 0}`, ANSI.gray, useColor), width),
|
|
1317
|
+
];
|
|
1318
|
+
|
|
1319
|
+
return lines.slice(0, height).map((line) => fitText(line, width));
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
function renderBox(lines, width, title, { useColor = false, color = ANSI.cyan, style = 'normal' } = {}) {
|
|
1323
|
+
const innerWidth = Math.max(10, width - 4);
|
|
1324
|
+
const titleText = title ? ` ${title.toUpperCase()} ` : '';
|
|
1325
|
+
const topLeft = style === 'focus' ? '╭' : style === 'hud' ? '┏' : '┌';
|
|
1326
|
+
const topRight = style === 'focus' ? '╮' : style === 'hud' ? '┓' : '┐';
|
|
1327
|
+
const bottomLeft = style === 'focus' ? '╰' : style === 'hud' ? '┗' : '└';
|
|
1328
|
+
const bottomRight = style === 'focus' ? '╯' : style === 'hud' ? '┛' : '┘';
|
|
1329
|
+
const topFill = style === 'focus' ? '═' : '─';
|
|
1330
|
+
const bottomTail = style === 'focus' ? '══' : '┄┄';
|
|
1331
|
+
const top = `${topLeft}${titleText}${topFill.repeat(Math.max(0, width - 2 - titleText.length))}${topRight}`;
|
|
1332
|
+
const bottom = `${bottomLeft}${topFill.repeat(Math.max(0, width - 4))}${bottomTail}${bottomRight}`;
|
|
1333
|
+
const body = lines.map((line, index) => {
|
|
1334
|
+
const left = index === 0
|
|
1335
|
+
? (style === 'focus' ? '╞' : '├')
|
|
1336
|
+
: index === lines.length - 1
|
|
1337
|
+
? (style === 'focus' ? '╘' : '╰')
|
|
1338
|
+
: '│';
|
|
1339
|
+
const right = index === 0
|
|
1340
|
+
? (style === 'focus' ? '╡' : '┤')
|
|
1341
|
+
: index === lines.length - 1
|
|
1342
|
+
? (style === 'focus' ? '╛' : '╯')
|
|
1343
|
+
: '│';
|
|
1344
|
+
return `${colorize(left, color, useColor)} ${fitText(line, innerWidth)} ${colorize(right, color, useColor)}`;
|
|
1345
|
+
});
|
|
1346
|
+
return [
|
|
1347
|
+
colorize(top, color, useColor),
|
|
1348
|
+
...body,
|
|
1349
|
+
colorize(bottom, color, useColor),
|
|
1350
|
+
];
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
function joinHorizontalBoxes(boxes, gutter = 2) {
|
|
1354
|
+
const height = Math.max(...boxes.map((box) => box.lines.length));
|
|
1355
|
+
const gap = ' '.repeat(gutter);
|
|
1356
|
+
const rows = [];
|
|
1357
|
+
|
|
1358
|
+
for (let index = 0; index < height; index += 1) {
|
|
1359
|
+
rows.push(boxes.map((box) => box.lines[index] ?? ' '.repeat(box.width)).join(gap));
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
return rows;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
export function formatCyberMenuFrame(status, commands, selectedIndex, tick = 0, {
|
|
1366
|
+
columns = 120,
|
|
1367
|
+
rows = 32,
|
|
1368
|
+
useColor = false,
|
|
1369
|
+
ascii = false,
|
|
1370
|
+
} = {}) {
|
|
1371
|
+
const glyphSet = resolveGlyphSet({ ascii });
|
|
1372
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
1373
|
+
const height = Math.max(22, Math.min(rows - 1, 42));
|
|
1374
|
+
const compactMode = width < 104 || height < 27;
|
|
1375
|
+
const rightWidth = compactMode ? (width >= 92 ? 28 : 26) : width >= 132 ? 44 : width >= 118 ? 40 : width >= 108 ? 36 : 34;
|
|
1376
|
+
const gutter = 2;
|
|
1377
|
+
const leftWidth = width - rightWidth - gutter;
|
|
1378
|
+
const selected = commands[selectedIndex] ?? commands[0];
|
|
1379
|
+
const actionArea = resolveCommandArea(selected);
|
|
1380
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
1381
|
+
const summaryOuterHeight = compactMode ? 7 : 9;
|
|
1382
|
+
const bodyOuterHeight = Math.max(12, height - summaryOuterHeight - 1);
|
|
1383
|
+
const detailOuterHeight = compactMode
|
|
1384
|
+
? Math.min(8, Math.max(7, Math.floor(bodyOuterHeight * 0.46)))
|
|
1385
|
+
: Math.min(10, Math.max(8, Math.floor(bodyOuterHeight * 0.42)));
|
|
1386
|
+
const actionOuterHeight = compactMode
|
|
1387
|
+
? Math.max(8, bodyOuterHeight - detailOuterHeight)
|
|
1388
|
+
: Math.max(8, bodyOuterHeight - detailOuterHeight);
|
|
1389
|
+
const rightBottomOuterHeight = compactMode
|
|
1390
|
+
? Math.min(8, Math.max(7, Math.floor(bodyOuterHeight * 0.4)))
|
|
1391
|
+
: Math.min(10, Math.max(9, Math.floor(bodyOuterHeight * 0.36)));
|
|
1392
|
+
const rightTopOuterHeight = Math.max(8, bodyOuterHeight - rightBottomOuterHeight);
|
|
1393
|
+
const summaryInnerWidth = width - 4;
|
|
1394
|
+
const actionInnerWidth = leftWidth - 4;
|
|
1395
|
+
const detailInnerWidth = leftWidth - 4;
|
|
1396
|
+
const rightInnerWidth = rightWidth - 4;
|
|
1397
|
+
const summaryInnerHeight = summaryOuterHeight - 2;
|
|
1398
|
+
const actionInnerHeight = actionOuterHeight - 2;
|
|
1399
|
+
const detailInnerHeight = detailOuterHeight - 2;
|
|
1400
|
+
const rightTopInnerHeight = rightTopOuterHeight - 2;
|
|
1401
|
+
const rightBottomInnerHeight = rightBottomOuterHeight - 2;
|
|
1402
|
+
const visibleActionRows = Math.max(compactMode ? 2 : 3, actionInnerHeight - (compactMode ? 2 : 3));
|
|
1403
|
+
const scrollStart = Math.min(
|
|
1404
|
+
Math.max(0, selectedIndex - Math.floor(visibleActionRows / 2)),
|
|
1405
|
+
Math.max(0, commands.length - visibleActionRows),
|
|
1406
|
+
);
|
|
1407
|
+
const visibleCommands = commands.slice(scrollStart, scrollStart + visibleActionRows);
|
|
1408
|
+
|
|
1409
|
+
const summaryLines = compactMode
|
|
1410
|
+
? [
|
|
1411
|
+
colorize('SKILL MASTER MENU', ANSI.bold, useColor),
|
|
1412
|
+
`version ${status.semver} | channel ${status.manifestVersion} | readiness ${status.globalReadiness.ready ? 'ready' : status.globalReadiness.mode}`,
|
|
1413
|
+
colorize(`GLOBAL SKILLS ${status.globalReadiness.installed.length}/${status.globalReadiness.required}`, ANSI.amber, useColor),
|
|
1414
|
+
`bundle ${bundledCatalog.total} | drafts ${status.pendingSuccessDrafts} | study ${status.studyCandidates}`,
|
|
1415
|
+
buildOverviewSignalLine(status, summaryInnerWidth, tick, { useColor, compact: true, glyphSet }),
|
|
1416
|
+
colorize(buildSetupAlertLine(status, true) ?? 'compact cyberpunk hud / operator safe', status.globalReadiness.ready ? ANSI.dim : ANSI.rose, useColor),
|
|
1417
|
+
]
|
|
1418
|
+
: [
|
|
1419
|
+
colorize('SKILL MASTER MENU', ANSI.bold, useColor),
|
|
1420
|
+
`version ${status.semver} | channel ${status.manifestVersion} | readiness ${status.globalReadiness.ready ? 'ready' : status.globalReadiness.mode}`,
|
|
1421
|
+
colorize(`GLOBAL SKILLS ${status.globalReadiness.installed.length}/${status.globalReadiness.required}`, ANSI.amber, useColor),
|
|
1422
|
+
`bundle ${bundledCatalog.total} | drafts ${status.pendingSuccessDrafts} | study ${status.studyCandidates}`,
|
|
1423
|
+
renderStatusCapsule('FOCUS', `${actionArea} / ${selected?.key ?? 'status'}`, summaryInnerWidth, { useColor, color: ANSI.teal }),
|
|
1424
|
+
buildOverviewSignalLine(status, summaryInnerWidth, tick, { useColor, compact: false, glyphSet }),
|
|
1425
|
+
colorize(buildSetupAlertLine(status, false) ?? formatBundledCategoryLine(bundledCatalog), status.globalReadiness.ready ? ANSI.white : ANSI.rose, useColor),
|
|
1426
|
+
colorize(buildSetupAlertLine(status, false) ?? `clients ${summarizeClientReadiness(status.globalReadiness)}`, status.globalReadiness.ready ? ANSI.dim : ANSI.rose, useColor),
|
|
1427
|
+
];
|
|
1428
|
+
|
|
1429
|
+
const actionLines = [
|
|
1430
|
+
colorize('ACTION MATRIX', ANSI.gray, useColor),
|
|
1431
|
+
colorize('up/down move enter run q exit', ANSI.dim, useColor),
|
|
1432
|
+
fitText(colorize(`window ${Math.min(selectedIndex + 1, commands.length)}/${commands.length} | visible ${visibleCommands.length}`, ANSI.gray, useColor), actionInnerWidth),
|
|
1433
|
+
...visibleCommands.map((command, offset) => {
|
|
1434
|
+
const index = scrollStart + offset;
|
|
1435
|
+
const marker = index === selectedIndex ? '>' : glyphSet.ascii ? '-' : '·';
|
|
1436
|
+
const disabled = command.disabledReason ? ' [off]' : '';
|
|
1437
|
+
const flair = index === selectedIndex && !compactMode ? glyphSet.ascii ? ' >' : ' ◢' : '';
|
|
1438
|
+
const badge = getActionAttentionBadge(command, status);
|
|
1439
|
+
const label = `${marker} ${badge}${command.label}${disabled}${flair}`;
|
|
1440
|
+
const color = getActionLineColor(command, index === selectedIndex, status);
|
|
1441
|
+
const fitted = fitText(label, actionInnerWidth);
|
|
1442
|
+
return color ? colorize(fitted, color, useColor) : fitted;
|
|
1443
|
+
}),
|
|
1444
|
+
];
|
|
1445
|
+
|
|
1446
|
+
while (actionLines.length < actionInnerHeight) {
|
|
1447
|
+
actionLines.push(fitText('', actionInnerWidth));
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
const descriptionLines = [
|
|
1451
|
+
colorize('DETAIL FOCUS', ANSI.amber, useColor),
|
|
1452
|
+
colorize(selected?.label ?? 'Nenhuma acao', ANSI.bold, useColor),
|
|
1453
|
+
renderStatusCapsule('AREA', `${actionArea} | action ${Math.min(selectedIndex + 1, commands.length)}/${commands.length}`, detailInnerWidth, { useColor, color: ANSI.gray }),
|
|
1454
|
+
...((selected?.effect || selected?.risk || selected?.requiresTty) && formatActionBadges(selected) ? [fitText(formatActionBadges(selected), detailInnerWidth)] : []),
|
|
1455
|
+
fitText(colorize(patternFill('=-', 32), ANSI.amber, useColor), detailInnerWidth),
|
|
1456
|
+
...(() => {
|
|
1457
|
+
const attention = getActionAttentionState(selected, status);
|
|
1458
|
+
if (attention === 'critical') {
|
|
1459
|
+
return splitText('priority: setup inicial fortemente recomendado. Esta acao autentica o MCP no sistema e prepara os clientes deste computador.', detailInnerWidth, 2);
|
|
1460
|
+
}
|
|
1461
|
+
if (attention === 'priority') {
|
|
1462
|
+
return splitText('priority: suporte ao setup global. Use junto do bootstrap para deixar Codex, Claude, Gemini e skills prontos neste computador.', detailInnerWidth, 2);
|
|
1463
|
+
}
|
|
1464
|
+
return [];
|
|
1465
|
+
})(),
|
|
1466
|
+
...splitText(selected?.description ? `desc: ${selected.description}` : '', detailInnerWidth, 1),
|
|
1467
|
+
...((selected?.details ?? []).slice(0, 1).flatMap((detail) => splitText(`detail: ${detail}`, detailInnerWidth, 1))),
|
|
1468
|
+
...(selected?.key === 'updateGlobal'
|
|
1469
|
+
? splitText('recommended: se houver handoff ou aviso, feche o menu, rode o comando exibido e reabra os clientes MCP depois.', detailInnerWidth, 3)
|
|
1470
|
+
: []),
|
|
1471
|
+
...(selected?.automationHint ? splitText(`automation: ${selected.automationHint}`, detailInnerWidth, 2) : []),
|
|
1292
1472
|
...splitText(`exec: ${formatActionCommand(selected)}`, detailInnerWidth, 1),
|
|
1293
|
-
...(selected?.
|
|
1294
|
-
...(selected?.
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
const
|
|
1341
|
-
const
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
fitText('', innerWidth),
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
...
|
|
1352
|
-
fitText('', innerWidth),
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
lines.
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
fitText(colorize(
|
|
1388
|
-
fitText(colorize(
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
'
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
'
|
|
1431
|
-
{ useColor,
|
|
1432
|
-
)
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
'
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1473
|
+
...splitText(selected?.success ? `result: ${selected.success}` : '', detailInnerWidth, 1),
|
|
1474
|
+
...((selected?.details ?? []).slice(1).flatMap((detail) => splitText(`detail: ${detail}`, detailInnerWidth, 2))),
|
|
1475
|
+
...(selected?.confirmMessage ? splitText(`confirmacao: ${selected.confirmMessage}`, detailInnerWidth, 2) : []),
|
|
1476
|
+
...(selected?.disabledReason ? splitText(`Indisponivel: ${selected.disabledReason}`, detailInnerWidth, 2) : []),
|
|
1477
|
+
];
|
|
1478
|
+
|
|
1479
|
+
while (descriptionLines.length < detailInnerHeight) {
|
|
1480
|
+
descriptionLines.push(fitText('', detailInnerWidth));
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
const rightTopLines = dnaPanelLines(tick, rightInnerWidth, rightTopInnerHeight, status, selected, { useColor, compact: compactMode, glyphSet });
|
|
1484
|
+
const rightBottomLines = telemetryPanelLines(status, selected, rightInnerWidth, rightBottomInnerHeight, { useColor, tick, compact: compactMode, glyphSet });
|
|
1485
|
+
const summaryBox = renderCyberFrame(
|
|
1486
|
+
summaryLines.slice(0, summaryInnerHeight).map((line) => fitText(line, summaryInnerWidth)),
|
|
1487
|
+
width,
|
|
1488
|
+
'overview',
|
|
1489
|
+
{ useColor, color: ANSI.white, style: 'hud', tick, glyphSet },
|
|
1490
|
+
);
|
|
1491
|
+
const actionBox = renderCyberFrame(
|
|
1492
|
+
actionLines.slice(0, actionInnerHeight).map((line) => fitText(line, actionInnerWidth)),
|
|
1493
|
+
leftWidth,
|
|
1494
|
+
'actions',
|
|
1495
|
+
{ useColor, color: ANSI.gray, style: 'thin', tick, glyphSet },
|
|
1496
|
+
);
|
|
1497
|
+
const detailBox = renderCyberFrame(
|
|
1498
|
+
descriptionLines.slice(0, detailInnerHeight).map((line) => fitText(line, detailInnerWidth)),
|
|
1499
|
+
leftWidth,
|
|
1500
|
+
'details',
|
|
1501
|
+
{ useColor, color: ANSI.amber, style: 'focus', tick, glyphSet },
|
|
1502
|
+
);
|
|
1503
|
+
const dnaBox = renderCyberFrame(rightTopLines, rightWidth, 'dna-core', { useColor, color: ANSI.white, style: 'hud', tick, glyphSet });
|
|
1504
|
+
const telemetryBox = renderCyberFrame(rightBottomLines, rightWidth, 'telemetry', { useColor, color: ANSI.blue, style: 'thin', tick, glyphSet });
|
|
1505
|
+
const bodyRows = joinHorizontalBoxes([
|
|
1506
|
+
{ lines: [...actionBox, ...detailBox], width: leftWidth },
|
|
1507
|
+
{ lines: [...dnaBox, ...telemetryBox], width: rightWidth },
|
|
1508
|
+
], gutter);
|
|
1509
|
+
|
|
1510
|
+
return [...summaryBox, '', ...bodyRows].join('\n');
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export function formatRunningActionFrame(status, action, tick = 0, {
|
|
1514
|
+
columns = 120,
|
|
1515
|
+
rows = 32,
|
|
1516
|
+
useColor = false,
|
|
1517
|
+
ascii = false,
|
|
1518
|
+
} = {}) {
|
|
1519
|
+
const glyphSet = resolveGlyphSet({ ascii });
|
|
1520
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
1521
|
+
const height = Math.max(18, Math.min(rows - 1, 30));
|
|
1522
|
+
const innerWidth = width - 4;
|
|
1523
|
+
const commandArea = resolveCommandArea(action);
|
|
1524
|
+
const pulse = renderSparkline(buildTelemetrySeries((status.globalReadiness.installed.length || 1) + tick, Math.max(8, Math.min(18, Math.floor(innerWidth / 5))), tick), { useColor, color: ANSI.teal, glyphSet });
|
|
1525
|
+
const gridHeight = Math.max(4, Math.min(8, height - 14));
|
|
1526
|
+
const lines = [
|
|
1527
|
+
colorize('SKILL_MASTER WORKFLOW ONLINE', ANSI.bold, useColor),
|
|
1528
|
+
fitText(colorize(`area ${commandArea} | launching ${action?.label ?? 'acao'}`, ANSI.amber, useColor), innerWidth),
|
|
1529
|
+
fitText(colorize(`pulse ${pulse}`, ANSI.gray, useColor), innerWidth),
|
|
1530
|
+
fitText(renderCircuitRail(innerWidth, tick, { useColor, color: ANSI.teal }), innerWidth),
|
|
1531
|
+
...renderScanGrid(innerWidth, gridHeight, tick, { useColor }),
|
|
1532
|
+
fitText('', innerWidth),
|
|
1533
|
+
...splitText(action?.description ?? '', innerWidth, 2),
|
|
1534
|
+
...splitText(action?.success ? `resultado esperado: ${action.success}` : '', innerWidth, 2),
|
|
1535
|
+
...splitText(`exec: ${formatActionCommand(action)}`, innerWidth, 2),
|
|
1536
|
+
fitText('', innerWidth),
|
|
1537
|
+
fitText(colorize('handoff: HUD -> stream real do comando', ANSI.dim, useColor), innerWidth),
|
|
1538
|
+
];
|
|
1539
|
+
|
|
1540
|
+
while (lines.length < Math.max(8, height - 2)) {
|
|
1541
|
+
lines.push(fitText('', innerWidth));
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
return renderCyberFrame(
|
|
1545
|
+
lines.slice(0, Math.max(8, height - 2)).map((line) => fitText(line, innerWidth)),
|
|
1546
|
+
width,
|
|
1547
|
+
'running',
|
|
1548
|
+
{ useColor, color: ANSI.teal, style: 'running', tick, glyphSet },
|
|
1549
|
+
).join('\n');
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
export function formatSkillMasterIntroFrame(status, tick = 0, {
|
|
1553
|
+
columns = 120,
|
|
1554
|
+
rows = 32,
|
|
1555
|
+
useColor = false,
|
|
1556
|
+
ascii = false,
|
|
1557
|
+
message = 'skill_master assumindo o workflow',
|
|
1558
|
+
} = {}) {
|
|
1559
|
+
const glyphSet = resolveGlyphSet({ ascii });
|
|
1560
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
1561
|
+
const height = Math.max(18, Math.min(rows - 1, 34));
|
|
1562
|
+
const innerWidth = width - 4;
|
|
1563
|
+
const gridHeight = Math.max(6, Math.min(12, height - 12));
|
|
1564
|
+
const signal = renderSparkline(buildTelemetrySeries(status.pendingSuccessDrafts + status.studyCandidates + 5, Math.max(12, Math.min(28, Math.floor(innerWidth / 4))), tick), { useColor, color: ANSI.teal, glyphSet });
|
|
1565
|
+
const lines = [
|
|
1566
|
+
colorize('REBORN / SKILL_MASTER', ANSI.bold, useColor),
|
|
1567
|
+
fitText(colorize(message, ANSI.amber, useColor), innerWidth),
|
|
1568
|
+
fitText(colorize(`package ${status.packageName} | version ${status.semver} | channel ${status.manifestVersion}`, ANSI.gray, useColor), innerWidth),
|
|
1569
|
+
fitText(colorize(`signal ${signal}`, ANSI.teal, useColor), innerWidth),
|
|
1570
|
+
fitText(renderCircuitRail(innerWidth, tick, { useColor, color: ANSI.white }), innerWidth),
|
|
1571
|
+
...renderScanGrid(innerWidth, gridHeight, tick, { useColor }),
|
|
1572
|
+
fitText(renderCircuitRail(innerWidth, tick + 3, { useColor, color: ANSI.amber }), innerWidth),
|
|
1573
|
+
fitText(colorize(`global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} | bundle ${status.bundledCatalog?.total ?? 0} | study ${status.studyCandidates}`, ANSI.gray, useColor), innerWidth),
|
|
1574
|
+
fitText(colorize('modo visual seguro: terminal humano ativo / stdio MCP preservado', ANSI.dim, useColor), innerWidth),
|
|
1575
|
+
];
|
|
1576
|
+
|
|
1577
|
+
while (lines.length < Math.max(8, height - 2)) {
|
|
1578
|
+
lines.push(fitText('', innerWidth));
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
return renderCyberFrame(
|
|
1582
|
+
lines.slice(0, Math.max(8, height - 2)).map((line) => fitText(line, innerWidth)),
|
|
1583
|
+
width,
|
|
1584
|
+
'boot-sequence',
|
|
1585
|
+
{ useColor, color: ANSI.teal, style: 'hud', tick, glyphSet },
|
|
1586
|
+
).join('\n');
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
export function formatSkillMasterDnaHeroFrame(status, tick = 0, {
|
|
1590
|
+
columns = 120,
|
|
1591
|
+
rows = 32,
|
|
1592
|
+
useColor = false,
|
|
1593
|
+
ascii = false,
|
|
1594
|
+
} = {}) {
|
|
1595
|
+
const glyphSet = resolveGlyphSet({ ascii });
|
|
1596
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
1597
|
+
const height = Math.max(18, Math.min(rows - 1, 34));
|
|
1598
|
+
const innerWidth = width - 4;
|
|
1599
|
+
const dnaHeight = Math.max(10, Math.min(16, height - 10));
|
|
1600
|
+
const dnaWidth = Math.max(34, Math.min(innerWidth, 72));
|
|
1601
|
+
const signal = renderSparkline(
|
|
1602
|
+
buildTelemetrySeries(status.globalReadiness.installed.length + status.studyCandidates + 9, Math.max(14, Math.min(30, Math.floor(innerWidth / 4))), tick),
|
|
1603
|
+
{ useColor, color: ANSI.teal, glyphSet },
|
|
1604
|
+
);
|
|
1605
|
+
const dnaLines = dnaPanelLines(
|
|
1606
|
+
tick,
|
|
1607
|
+
dnaWidth,
|
|
1608
|
+
dnaHeight,
|
|
1609
|
+
status,
|
|
1610
|
+
{ key: 'dnaHero', label: 'DNA hero' },
|
|
1611
|
+
{ useColor, compact: false, glyphSet },
|
|
1612
|
+
);
|
|
1613
|
+
const centeredDna = dnaLines.map((line) => {
|
|
1614
|
+
const pad = Math.max(0, Math.floor((innerWidth - dnaWidth) / 2));
|
|
1615
|
+
return fitText(`${' '.repeat(pad)}${line.trimEnd()}`, innerWidth);
|
|
1616
|
+
});
|
|
1617
|
+
const lines = [
|
|
1618
|
+
colorize('SKILL_MASTER DNA ONLINE', ANSI.bold, useColor),
|
|
1619
|
+
fitText(colorize('boot hero / intelligence configuration / terminal-safe animation', ANSI.amber, useColor), innerWidth),
|
|
1620
|
+
fitText(colorize(`package ${status.packageName} | version ${status.semver} | channel ${status.manifestVersion}`, ANSI.gray, useColor), innerWidth),
|
|
1621
|
+
fitText(colorize(`DNA signal ${signal}`, ANSI.teal, useColor), innerWidth),
|
|
1622
|
+
...centeredDna,
|
|
1623
|
+
fitText(renderCircuitRail(innerWidth, tick, { useColor, color: ANSI.teal }), innerWidth),
|
|
1624
|
+
fitText(colorize(`ONLINE | global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} | bundle ${status.bundledCatalog?.total ?? 0}`, ANSI.gray, useColor), innerWidth),
|
|
1625
|
+
];
|
|
1626
|
+
|
|
1627
|
+
while (lines.length < Math.max(8, height - 2)) {
|
|
1628
|
+
lines.push(fitText('', innerWidth));
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
return renderCyberFrame(
|
|
1632
|
+
lines.slice(0, Math.max(8, height - 2)).map((line) => fitText(line, innerWidth)),
|
|
1633
|
+
width,
|
|
1634
|
+
'dna-hero',
|
|
1635
|
+
{ useColor, color: ANSI.teal, style: 'hud', tick, glyphSet },
|
|
1636
|
+
).join('\n');
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
export function formatCyberConfirmFrame(status, action, tick = 0, {
|
|
1640
|
+
columns = 120,
|
|
1641
|
+
rows = 32,
|
|
1642
|
+
useColor = false,
|
|
1643
|
+
ascii = false,
|
|
1644
|
+
} = {}) {
|
|
1645
|
+
const glyphSet = resolveGlyphSet({ ascii });
|
|
1646
|
+
const width = Math.max(72, Math.min(columns, 140));
|
|
1647
|
+
const height = Math.max(16, Math.min(rows - 1, 28));
|
|
1648
|
+
const innerWidth = width - 4;
|
|
1649
|
+
const commandArea = resolveCommandArea(action);
|
|
1650
|
+
const lines = [
|
|
1651
|
+
colorize('CONFIRMATION GATE', ANSI.bold, useColor),
|
|
1652
|
+
fitText(colorize(action?.confirmMessage ?? 'Confirmar acao?', ANSI.amber, useColor), innerWidth),
|
|
1653
|
+
fitText(`area ${commandArea} | action ${action?.key ?? 'unknown'}`, innerWidth),
|
|
1654
|
+
fitText(renderCircuitRail(innerWidth, tick, { useColor, color: ANSI.amber }), innerWidth),
|
|
1655
|
+
...splitText(action?.description ?? '', innerWidth, 2),
|
|
1656
|
+
...splitText(action?.success ? `resultado esperado: ${action.success}` : '', innerWidth, 2),
|
|
1657
|
+
fitText('', innerWidth),
|
|
1658
|
+
fitText(colorize('Y/Enter confirma N/Esc cancela', ANSI.teal, useColor), innerWidth),
|
|
1659
|
+
];
|
|
1660
|
+
|
|
1661
|
+
while (lines.length < Math.max(8, height - 2)) {
|
|
1662
|
+
lines.push(fitText('', innerWidth));
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
return renderCyberFrame(
|
|
1666
|
+
lines.slice(0, Math.max(8, height - 2)).map((line) => fitText(line, innerWidth)),
|
|
1667
|
+
width,
|
|
1668
|
+
'subroutine',
|
|
1669
|
+
{ useColor, color: ANSI.amber, style: 'focus', tick, glyphSet },
|
|
1670
|
+
).join('\n');
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
export function formatActionHeader(action, { useColor = false } = {}) {
|
|
1674
|
+
const lines = [
|
|
1675
|
+
colorize(action.label, ANSI.bold, useColor),
|
|
1676
|
+
formatActionBadges(action),
|
|
1677
|
+
action.description,
|
|
1678
|
+
...(action.details ?? []),
|
|
1679
|
+
action.automationHint ? `Automacao: ${action.automationHint}` : null,
|
|
1680
|
+
action.success ? `Resultado esperado: ${action.success}` : null,
|
|
1681
|
+
action.disabledReason ? `Indisponivel: ${action.disabledReason}` : null,
|
|
1682
|
+
].filter(Boolean);
|
|
1683
|
+
|
|
1684
|
+
const width = Math.max(72, Math.min(120, Math.max(...lines.map((line) => visibleLength(line))) + 8));
|
|
1685
|
+
return renderCyberFrame(
|
|
1686
|
+
lines.map((line) => fitText(line, width - 4)),
|
|
1687
|
+
width,
|
|
1688
|
+
'skill-master action',
|
|
1689
|
+
{ color: ANSI.green, useColor, style: 'hud' },
|
|
1690
|
+
).join('\n');
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
export function formatResultMessage(code, { useColor = false } = {}) {
|
|
1694
|
+
const result = buildOperationResultCopy(code);
|
|
1695
|
+
const tone = result.kind === 'ok' ? 'ok' : result.kind === 'warning' ? 'warning' : 'error';
|
|
1696
|
+
const color = tone === 'ok' ? ANSI.green : tone === 'warning' ? ANSI.amber : ANSI.red;
|
|
1697
|
+
const lines = [
|
|
1698
|
+
colorize(result.heading, color, useColor),
|
|
1699
|
+
result.summary,
|
|
1700
|
+
result.next,
|
|
1701
|
+
tone === 'warning' ? 'consulte o proximo passo recomendado no log acima' : null,
|
|
1702
|
+
];
|
|
1703
|
+
|
|
1704
|
+
return renderCyberFrame(
|
|
1705
|
+
lines.filter(Boolean).map((line) => fitText(line, 68)),
|
|
1706
|
+
72,
|
|
1707
|
+
result.frameTitle,
|
|
1708
|
+
{ color, useColor, style: tone === 'ok' ? 'hud' : 'focus' },
|
|
1709
|
+
).join('\n');
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
export function formatPlainResultMessage(code, { useColor = false } = {}) {
|
|
1713
|
+
const result = buildOperationResultCopy(code);
|
|
1714
|
+
const color = result.kind === 'ok' ? ANSI.green : result.kind === 'warning' ? ANSI.amber : ANSI.red;
|
|
1715
|
+
return colorize(result.summary, color, useColor);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
export function formatHelp(commands) {
|
|
1719
|
+
const actionList = commands.map((command) => {
|
|
1720
|
+
const aliases = command.aliases.length ? ` aliases: ${command.aliases.join(', ')}` : '';
|
|
1721
|
+
const disabled = command.disabledReason ? ` indisponivel: ${command.disabledReason}` : '';
|
|
1722
|
+
const badges = formatActionBadges(command);
|
|
1723
|
+
const hint = command.automationHint ? `\n ${command.automationHint}` : '';
|
|
1724
|
+
return ` - ${command.key}: ${command.label}${badges ? ` ${badges}` : ''}\n ${command.description}${aliases}${disabled}${hint}`;
|
|
1725
|
+
}).join('\n');
|
|
1726
|
+
const workspaceActions = commands
|
|
1727
|
+
.filter((command) => ['check', 'build', 'installProjectSkills', 'activateLearnedLocal'].includes(command.key))
|
|
1728
|
+
.map((command) => ` - ${command.key}: ${command.label}`)
|
|
1729
|
+
.join('\n');
|
|
1730
|
+
const globalActions = commands
|
|
1731
|
+
.filter((command) => ['updateGlobal', 'privateRegistry', 'activationAlwaysOn', 'installGlobalSkills', 'bootstrapGlobal', 'registerClients', 'rejectLearnedSkill', 'activateLearnedGlobal'].includes(command.key))
|
|
1732
|
+
.map((command) => ` - ${command.key}: ${command.label}`)
|
|
1733
|
+
.join('\n');
|
|
1734
|
+
|
|
1735
|
+
return `Skill Master Menu
|
|
1736
|
+
|
|
1737
|
+
Uso humano:
|
|
1738
|
+
skill-master-menu
|
|
1739
|
+
skill-master-menu --help
|
|
1740
|
+
|
|
1741
|
+
Automacao sem TTY:
|
|
1488
1742
|
skill-master-menu --status
|
|
1489
1743
|
skill-master-menu --run <acao>
|
|
1490
1744
|
skill-master-menu --run update --yes
|
|
1745
|
+
skill-master-menu --run activate-learned-local --manifest <manifest.json> --yes
|
|
1746
|
+
skill-master-menu --run activate-learned-global --manifest <manifest.json> --yes
|
|
1747
|
+
skill-master-menu --run prompt-router --prompt "validar menu nota 10"
|
|
1748
|
+
skill-master-menu --run activate-learned-local --list
|
|
1749
|
+
skill-master-menu --run activate-learned-global --list
|
|
1491
1750
|
skill-master-menu --help
|
|
1492
1751
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
skill-master-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
export function runCommand(action, { cwd, env = process.env } = {}) {
|
|
1502
|
-
return new Promise((resolve, reject) => {
|
|
1503
|
-
let child;
|
|
1752
|
+
Diagnostico seguro:
|
|
1753
|
+
skill-master-menu --status
|
|
1754
|
+
skill-master-menu --run doctor
|
|
1755
|
+
skill-master-menu --run public-npm
|
|
1756
|
+
skill-master-menu --run notifications
|
|
1757
|
+
|
|
1758
|
+
Acoes que escrevem no workspace:
|
|
1759
|
+
${workspaceActions}
|
|
1504
1760
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
cwd,
|
|
1508
|
-
env,
|
|
1509
|
-
shell: Boolean(action.shell),
|
|
1510
|
-
stdio: 'inherit',
|
|
1511
|
-
});
|
|
1512
|
-
} catch (error) {
|
|
1513
|
-
reject(error);
|
|
1514
|
-
return;
|
|
1515
|
-
}
|
|
1761
|
+
Acoes globais ou de risco alto:
|
|
1762
|
+
${globalActions}
|
|
1516
1763
|
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1764
|
+
Acoes disponiveis:
|
|
1765
|
+
${actionList}
|
|
1766
|
+
|
|
1767
|
+
Parametros uteis:
|
|
1768
|
+
--prompt "texto" passa prompt direto ao router sem abrir pergunta interativa
|
|
1769
|
+
--manifest <arquivo> seleciona manifest explicito de skill aprendida
|
|
1770
|
+
--list lista drafts quando usado com activate-learned-local/global
|
|
1771
|
+
--yes confirma acoes mutantes em automacao
|
|
1772
|
+
--overwrite permite substituir skill ja instalada quando usado com --manifest
|
|
1773
|
+
|
|
1774
|
+
O comando de menu e voltado para operacao humana. O binario MCP stdio continua sendo:
|
|
1775
|
+
skill-master-mcp
|
|
1776
|
+
`;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
export function runCommand(action, { cwd, env = process.env } = {}) {
|
|
1780
|
+
return new Promise((resolve, reject) => {
|
|
1781
|
+
let child;
|
|
1782
|
+
|
|
1783
|
+
try {
|
|
1784
|
+
child = spawn(action.command, action.args, {
|
|
1785
|
+
cwd,
|
|
1786
|
+
env,
|
|
1787
|
+
shell: Boolean(action.shell),
|
|
1788
|
+
stdio: 'inherit',
|
|
1789
|
+
});
|
|
1790
|
+
} catch (error) {
|
|
1791
|
+
reject(error);
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
child.on('error', reject);
|
|
1796
|
+
child.on('close', (code) => {
|
|
1797
|
+
resolve(code ?? 1);
|
|
1798
|
+
});
|
|
1799
|
+
});
|
|
1800
|
+
}
|