@fprad0/skill-master-mcp 0.0.9 → 0.0.11
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 +15 -0
- package/README.md +43 -9
- package/VERSION.md +3 -3
- package/bin/lib/client-config.mjs +268 -0
- package/bin/lib/menu-core.mjs +678 -33
- package/bin/skill-master-bootstrap-global.mjs +15 -1
- package/bin/skill-master-doctor.mjs +181 -0
- package/bin/skill-master-install-global-skills.mjs +30 -10
- package/bin/skill-master-menu.mjs +184 -36
- package/bin/skill-master-register-clients.mjs +43 -99
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/docs/operations/GUIA_MULTI_COMPUTADOR.md +255 -0
- package/docs/operations/GUIA_NPM_PUBLICO.md +147 -0
- package/docs/skill-candidates/v0.0.10/cli-creator/LICENSE.txt +201 -0
- package/docs/skill-candidates/v0.0.10/cli-creator/SKILL.md +160 -0
- package/docs/skill-candidates/v0.0.10/cli-creator/agents/openai.yaml +4 -0
- package/docs/skill-candidates/v0.0.10/cli-creator/references/agent-cli-patterns.md +154 -0
- package/docs/skill-candidates/v0.0.10/developer-workstation-ops/SKILL.md +32 -0
- package/docs/skill-candidates/v0.0.10/figma/LICENSE.txt +2 -0
- package/docs/skill-candidates/v0.0.10/figma/SKILL.md +42 -0
- package/docs/skill-candidates/v0.0.10/figma/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma/references/figma-mcp-config.md +35 -0
- package/docs/skill-candidates/v0.0.10/figma/references/figma-tools-and-prompts.md +34 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/LICENSE.TXT +2 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/SKILL.md +349 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/references/mapping-checklist.md +7 -0
- package/docs/skill-candidates/v0.0.10/figma-code-connect-components/scripts/normalize_node_id.py +25 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/LICENSE.TXT +2 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/SKILL.md +537 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/references/rule-template.md +15 -0
- package/docs/skill-candidates/v0.0.10/figma-create-design-system-rules/scripts/check_agents_md.sh +9 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/LICENSE.TXT +2 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/SKILL.md +341 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-design/maintainers.yml +1 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/LICENSE.TXT +2 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/SKILL.md +314 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/maintainers.yml +3 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/code-connect-setup.md +260 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/component-creation.md +1014 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/discovery-phase.md +518 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/documentation-creation.md +834 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/error-recovery.md +540 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/naming-conventions.md +527 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/references/token-creation.md +962 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/bindVariablesToComponent.js +110 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/cleanupOrphans.js +127 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createComponentWithVariants.js +148 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createDocumentationPage.js +139 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createSemanticTokens.js +108 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/createVariableCollection.js +49 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/inspectFileStructure.js +121 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/rehydrateState.js +92 -0
- package/docs/skill-candidates/v0.0.10/figma-generate-library/scripts/validateCreation.js +83 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/LICENSE.txt +2 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/SKILL.md +258 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-implement-design/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-use/LICENSE.TXT +2 -0
- package/docs/skill-candidates/v0.0.10/figma-use/SKILL.md +233 -0
- package/docs/skill-candidates/v0.0.10/figma-use/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/figma-use/assets/figma-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/figma-use/assets/figma.png +0 -0
- package/docs/skill-candidates/v0.0.10/figma-use/assets/icon.svg +28 -0
- package/docs/skill-candidates/v0.0.10/figma-use/maintainers.yml +1 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/api-reference.md +301 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/common-patterns.md +512 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/component-patterns.md +488 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/effect-style-patterns.md +123 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/gotchas.md +599 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/maintainers.yml +12 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-patterns.md +513 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-standalone.d.ts +11293 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/plugin-api-standalone.index.md +441 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/text-style-patterns.md +203 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/validation-and-recovery.md +109 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/variable-patterns.md +354 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/maintainers.yml +9 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components--creating.md +17 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components--using.md +17 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-components.md +50 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-effect-styles.md +52 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-text-styles.md +90 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables--creating.md +13 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables--using.md +13 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds-variables.md +64 -0
- package/docs/skill-candidates/v0.0.10/figma-use/references/working-with-design-systems/wwds.md +41 -0
- package/docs/skill-candidates/v0.0.10/frontend-design/LICENSE.txt +177 -0
- package/docs/skill-candidates/v0.0.10/frontend-design/SKILL.md +55 -0
- package/docs/skill-candidates/v0.0.10/frontend-ui-ux-systems/SKILL.md +32 -0
- package/docs/skill-candidates/v0.0.10/github/SKILL.md +74 -0
- package/docs/skill-candidates/v0.0.10/github/agents/openai.yaml +6 -0
- package/docs/skill-candidates/v0.0.10/github/assets/github-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/github/assets/github.png +0 -0
- package/docs/skill-candidates/v0.0.10/image-graphic-design-rendering/SKILL.md +28 -0
- package/docs/skill-candidates/v0.0.10/language-quality-pt-en-fr-it-ru/SKILL.md +28 -0
- package/docs/skill-candidates/v0.0.10/math-physics-reasoning/SKILL.md +28 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/LICENSE.txt +202 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/SKILL.md +236 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/evaluation.md +602 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/node_mcp_server.md +970 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/reference/python_mcp_server.md +719 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/connections.py +151 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/evaluation.py +373 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/docs/skill-candidates/v0.0.10/mcp-builder/scripts/requirements.txt +2 -0
- package/docs/skill-candidates/v0.0.10/mcp-client-readiness/SKILL.md +31 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/LICENSE.txt +201 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/SKILL.md +161 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/agents/openai.yaml +14 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/assets/openai-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/assets/openai.png +0 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/references/latest-model.md +37 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/references/prompting-guide.md +244 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/references/upgrade-guide.md +181 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/scripts/fetch-codex-manual.mjs +598 -0
- package/docs/skill-candidates/v0.0.10/openai-docs/scripts/resolve-latest-model-info.js +147 -0
- package/docs/skill-candidates/v0.0.10/playwright/LICENSE.txt +201 -0
- package/docs/skill-candidates/v0.0.10/playwright/NOTICE.txt +14 -0
- package/docs/skill-candidates/v0.0.10/playwright/SKILL.md +147 -0
- package/docs/skill-candidates/v0.0.10/playwright/agents/openai.yaml +6 -0
- package/docs/skill-candidates/v0.0.10/playwright/assets/playwright-small.svg +3 -0
- package/docs/skill-candidates/v0.0.10/playwright/assets/playwright.png +0 -0
- package/docs/skill-candidates/v0.0.10/playwright/references/cli.md +116 -0
- package/docs/skill-candidates/v0.0.10/playwright/references/workflows.md +95 -0
- package/docs/skill-candidates/v0.0.10/playwright/scripts/playwright_cli.sh +25 -0
- package/docs/skill-candidates/v0.0.10/polyglot-backend-engineering/SKILL.md +32 -0
- package/docs/skill-candidates/v0.0.10/screenshot/LICENSE.txt +201 -0
- package/docs/skill-candidates/v0.0.10/screenshot/SKILL.md +267 -0
- package/docs/skill-candidates/v0.0.10/screenshot/agents/openai.yaml +6 -0
- package/docs/skill-candidates/v0.0.10/screenshot/assets/screenshot-small.svg +5 -0
- package/docs/skill-candidates/v0.0.10/screenshot/assets/screenshot.png +0 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/ensure_macos_permissions.sh +54 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_display_info.swift +22 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_permissions.swift +40 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/macos_window_info.swift +126 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/take_screenshot.ps1 +163 -0
- package/docs/skill-candidates/v0.0.10/screenshot/scripts/take_screenshot.py +585 -0
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/SKILL.md +62 -0
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/agents/openai.yaml +4 -0
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/activation-policy.md +77 -0
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/human-approval-policy.md +83 -0
- package/docs/skill-candidates/v0.0.10/skill-master-orchestrator/references/persona-dev-senior-master.md +46 -0
- package/docs/skill-candidates/v0.0.10/terminal-menu-operations/SKILL.md +30 -0
- package/docs/skill-candidates/v0.0.10/terminal-pixel-art-tui/SKILL.md +43 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/LICENSE.txt +202 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/SKILL.md +96 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/console_logging.py +35 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/element_discovery.py +40 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/examples/static_html_automation.py +33 -0
- package/docs/skill-candidates/v0.0.10/webapp-testing/scripts/with_server.py +106 -0
- package/docs/skill-candidates/v0.0.10/winui-app/LICENSE.txt +202 -0
- package/docs/skill-candidates/v0.0.10/winui-app/SKILL.md +94 -0
- package/docs/skill-candidates/v0.0.10/winui-app/agents/openai.yaml +5 -0
- package/docs/skill-candidates/v0.0.10/winui-app/assets/winui.png +0 -0
- package/docs/skill-candidates/v0.0.10/winui-app/config.yaml +50 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/_sections.md +96 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/accessibility-input-and-localization.md +51 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/build-run-and-launch-verification.md +72 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/community-toolkit-controls-and-helpers.md +57 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/controls-layout-and-adaptive-ui.md +84 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-environment-audit-and-remediation.md +82 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-setup-and-project-selection.md +67 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-template-first-recovery.md +62 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/foundation-winui-app-structure.md +62 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/motion-animations-and-polish.md +45 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/performance-diagnostics-and-responsiveness.md +46 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/sample-source-map.md +37 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/shell-navigation-and-windowing.md +67 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/styling-theming-materials-and-icons.md +71 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/testing-debugging-and-review-checklists.md +77 -0
- package/docs/skill-candidates/v0.0.10/winui-app/references/windows-app-sdk-lifecycle-notifications-and-deployment.md +52 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/SKILL.md +399 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/common-patterns.md +331 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/complete-examples.md +872 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/component-patterns.md +502 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/data-fetching.md +767 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/file-organization.md +502 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/loading-and-error-states.md +501 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/performance.md +406 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/routing-guide.md +364 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/styling-guide.md +428 -0
- package/docs/skill-candidates/v0.0.11/frontend-dev-guidelines/resources/typescript-standards.md +418 -0
- package/docs/skill-candidates/v0.0.11/git-version-control-ops/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/go-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/java-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/javascript-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/json-contract-design/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/multi-client-mcp-ops/SKILL.md +36 -0
- package/docs/skill-candidates/v0.0.11/nextjs/SKILL.md +745 -0
- package/docs/skill-candidates/v0.0.11/nextjs/agents/openai.yaml +3 -0
- package/docs/skill-candidates/v0.0.11/nextjs/references/app-router-files.md +94 -0
- package/docs/skill-candidates/v0.0.11/python-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/ruby-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/SKILL.md +209 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/architecture_patterns.md +103 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/development_workflows.md +103 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/references/tech_stack_guide.md +103 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/docs/skill-candidates/v0.0.11/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/docs/skill-candidates/v0.0.11/shadcn/SKILL.md +573 -0
- package/docs/skill-candidates/v0.0.11/shadcn/agents/openai.yaml +3 -0
- package/docs/skill-candidates/v0.0.11/sql-postgresql-engineering/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/terminal-shell-ops/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/typescript-expert/SKILL.md +429 -0
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/tsconfig-strict.json +92 -0
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/docs/skill-candidates/v0.0.11/typescript-expert/references/utility-types.ts +335 -0
- package/docs/skill-candidates/v0.0.11/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/docs/skill-candidates/v0.0.11/ui-component-primitives/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/web-mobile-design-systems/SKILL.md +34 -0
- package/docs/skill-candidates/v0.0.11/windows-linux-platform-ops/SKILL.md +34 -0
- package/manifests/channels/beta.json +7 -7
- package/manifests/channels/stable.json +8 -8
- package/network/unapproved-skill-candidates.json +34 -1
- package/package.json +7 -2
- package/scripts/verify-menu-actions.mjs +115 -0
package/bin/lib/menu-core.mjs
CHANGED
|
@@ -3,6 +3,11 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import process from 'node:process';
|
|
6
|
+
import {
|
|
7
|
+
assessCodexConfigContent,
|
|
8
|
+
assessMcpServerConfig,
|
|
9
|
+
defaultClientConfigPaths,
|
|
10
|
+
} from './client-config.mjs';
|
|
6
11
|
|
|
7
12
|
const ANSI = {
|
|
8
13
|
reset: '\x1b[0m',
|
|
@@ -12,6 +17,11 @@ const ANSI = {
|
|
|
12
17
|
green: '\x1b[32m',
|
|
13
18
|
yellow: '\x1b[33m',
|
|
14
19
|
red: '\x1b[31m',
|
|
20
|
+
white: '\x1b[37m',
|
|
21
|
+
gray: '\x1b[90m',
|
|
22
|
+
teal: '\x1b[38;5;80m',
|
|
23
|
+
amber: '\x1b[38;5;179m',
|
|
24
|
+
blue: '\x1b[38;5;75m',
|
|
15
25
|
};
|
|
16
26
|
|
|
17
27
|
const REQUIRED_GLOBAL_SKILLS = [
|
|
@@ -25,12 +35,158 @@ const REQUIRED_GLOBAL_SKILLS = [
|
|
|
25
35
|
'engineering-systems-master',
|
|
26
36
|
'source-authority-reviewer',
|
|
27
37
|
'release-ethics-gate',
|
|
38
|
+
'mcp-client-readiness',
|
|
39
|
+
'terminal-menu-operations',
|
|
40
|
+
'terminal-pixel-art-tui',
|
|
28
41
|
];
|
|
29
42
|
|
|
43
|
+
const BUNDLED_SKILL_DOMAIN_GROUPS = [
|
|
44
|
+
{
|
|
45
|
+
key: 'moral',
|
|
46
|
+
label: 'moral-core',
|
|
47
|
+
skills: [
|
|
48
|
+
'ai-ethics-human-dignity',
|
|
49
|
+
'broad-domain-router',
|
|
50
|
+
'catholic-moral-discernment',
|
|
51
|
+
'engineering-systems-master',
|
|
52
|
+
'language-quality-pt-en-fr',
|
|
53
|
+
'math-science-reasoning',
|
|
54
|
+
'philosophy-sociology-discernment',
|
|
55
|
+
'professional-boundary-triage',
|
|
56
|
+
'release-ethics-gate',
|
|
57
|
+
'source-authority-reviewer',
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'frontend',
|
|
62
|
+
label: 'frontend-ui',
|
|
63
|
+
skills: [
|
|
64
|
+
'figma',
|
|
65
|
+
'figma-code-connect-components',
|
|
66
|
+
'figma-create-design-system-rules',
|
|
67
|
+
'figma-generate-design',
|
|
68
|
+
'figma-generate-library',
|
|
69
|
+
'figma-implement-design',
|
|
70
|
+
'figma-use',
|
|
71
|
+
'frontend-dev-guidelines',
|
|
72
|
+
'frontend-design',
|
|
73
|
+
'frontend-ui-ux-systems',
|
|
74
|
+
'nextjs',
|
|
75
|
+
'playwright',
|
|
76
|
+
'screenshot',
|
|
77
|
+
'senior-fullstack',
|
|
78
|
+
'shadcn',
|
|
79
|
+
'ui-component-primitives',
|
|
80
|
+
'webapp-testing',
|
|
81
|
+
'web-mobile-design-systems',
|
|
82
|
+
'winui-app',
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: 'backend',
|
|
87
|
+
label: 'backend-data',
|
|
88
|
+
skills: [
|
|
89
|
+
'go-engineering',
|
|
90
|
+
'java-engineering',
|
|
91
|
+
'javascript-engineering',
|
|
92
|
+
'json-contract-design',
|
|
93
|
+
'mcp-builder',
|
|
94
|
+
'polyglot-backend-engineering',
|
|
95
|
+
'python-engineering',
|
|
96
|
+
'ruby-engineering',
|
|
97
|
+
'sql-postgresql-engineering',
|
|
98
|
+
'typescript-expert',
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: 'ops',
|
|
103
|
+
label: 'ops-clients',
|
|
104
|
+
skills: [
|
|
105
|
+
'cli-creator',
|
|
106
|
+
'developer-workstation-ops',
|
|
107
|
+
'git-version-control-ops',
|
|
108
|
+
'github',
|
|
109
|
+
'mcp-client-readiness',
|
|
110
|
+
'multi-client-mcp-ops',
|
|
111
|
+
'openai-docs',
|
|
112
|
+
'skill-master-orchestrator',
|
|
113
|
+
'terminal-shell-ops',
|
|
114
|
+
'terminal-menu-operations',
|
|
115
|
+
'terminal-pixel-art-tui',
|
|
116
|
+
'windows-linux-platform-ops',
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'knowledge',
|
|
121
|
+
label: 'knowledge',
|
|
122
|
+
skills: [
|
|
123
|
+
'language-quality-pt-en-fr-it-ru',
|
|
124
|
+
'math-physics-reasoning',
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
const COMMAND_AREA_LABELS = {
|
|
130
|
+
status: 'diagnostico',
|
|
131
|
+
doctor: 'diagnostico',
|
|
132
|
+
check: 'desenvolvimento',
|
|
133
|
+
build: 'desenvolvimento',
|
|
134
|
+
publicNpm: 'distribuicao',
|
|
135
|
+
updateGlobal: 'distribuicao',
|
|
136
|
+
privateRegistry: 'registry',
|
|
137
|
+
activationStatus: 'ativacao',
|
|
138
|
+
activationBalanced: 'ativacao',
|
|
139
|
+
activationAlwaysOn: 'ativacao',
|
|
140
|
+
installGlobalSkills: 'skills-globais',
|
|
141
|
+
bootstrapGlobal: 'bootstrap-global',
|
|
142
|
+
registerClients: 'clientes-mcp',
|
|
143
|
+
promptRecommendation: 'roteamento',
|
|
144
|
+
successNotifications: 'aprendizado',
|
|
145
|
+
studySkills: 'aprendizado',
|
|
146
|
+
approvalPackage: 'aprovacao',
|
|
147
|
+
markLearnedStudy: 'aprovacao',
|
|
148
|
+
rejectLearnedSkill: 'aprovacao',
|
|
149
|
+
activateLearnedLocal: 'ativacao-skill',
|
|
150
|
+
activateLearnedGlobal: 'ativacao-skill',
|
|
151
|
+
notionSummary: 'documentacao',
|
|
152
|
+
};
|
|
153
|
+
|
|
30
154
|
function colorize(text, color, enabled) {
|
|
31
155
|
return enabled ? `${color}${text}${ANSI.reset}` : text;
|
|
32
156
|
}
|
|
33
157
|
|
|
158
|
+
function visibleLength(text) {
|
|
159
|
+
return String(text).replace(/\x1b\[[0-9;]*m/g, '').length;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function fitText(text, width) {
|
|
163
|
+
const value = String(text ?? '');
|
|
164
|
+
if (visibleLength(value) <= width) {
|
|
165
|
+
return `${value}${' '.repeat(width - visibleLength(value))}`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return `${value.slice(0, Math.max(0, width - 1))}~`;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function splitText(text, width, maxLines = 3) {
|
|
172
|
+
const words = String(text ?? '').split(/\s+/).filter(Boolean);
|
|
173
|
+
const lines = [];
|
|
174
|
+
let current = '';
|
|
175
|
+
|
|
176
|
+
for (const word of words) {
|
|
177
|
+
const next = current ? `${current} ${word}` : word;
|
|
178
|
+
if (next.length <= width) {
|
|
179
|
+
current = next;
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (current) lines.push(current);
|
|
183
|
+
current = word.length > width ? word.slice(0, width - 1) + '~' : word;
|
|
184
|
+
if (lines.length >= maxLines) break;
|
|
185
|
+
}
|
|
186
|
+
if (current && lines.length < maxLines) lines.push(current);
|
|
187
|
+
return lines.length ? lines : [''];
|
|
188
|
+
}
|
|
189
|
+
|
|
34
190
|
function globalSkillsRoot() {
|
|
35
191
|
return join(process.env.CODEX_HOME ?? join(os.homedir(), '.codex'), 'skills');
|
|
36
192
|
}
|
|
@@ -41,31 +197,33 @@ function readClientConfigState(filePath) {
|
|
|
41
197
|
}
|
|
42
198
|
|
|
43
199
|
const content = readFileSync(filePath, 'utf8');
|
|
44
|
-
const
|
|
45
|
-
const hasGlobalCommand = content.includes('command = "skill-master-mcp"') || content.includes("command = 'skill-master-mcp'");
|
|
46
|
-
const hasLauncher = content.includes('skill-master-launcher');
|
|
200
|
+
const assessment = assessCodexConfigContent(content);
|
|
47
201
|
|
|
48
202
|
return {
|
|
49
203
|
present: true,
|
|
50
|
-
kind:
|
|
51
|
-
globalCommand:
|
|
204
|
+
kind: assessment.mode,
|
|
205
|
+
globalCommand: assessment.robust,
|
|
206
|
+
command: assessment.command,
|
|
52
207
|
};
|
|
53
208
|
}
|
|
54
209
|
|
|
55
210
|
function readJsonState(filePath) {
|
|
56
211
|
if (!existsSync(filePath)) {
|
|
57
|
-
return { present: false, globalCommand: false };
|
|
212
|
+
return { present: false, kind: 'missing', globalCommand: false };
|
|
58
213
|
}
|
|
59
214
|
|
|
60
215
|
try {
|
|
61
216
|
const parsed = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
62
217
|
const server = parsed?.mcpServers?.skill_master;
|
|
218
|
+
const assessment = assessMcpServerConfig(server);
|
|
63
219
|
return {
|
|
64
220
|
present: true,
|
|
65
|
-
|
|
221
|
+
kind: assessment.mode,
|
|
222
|
+
globalCommand: assessment.robust,
|
|
223
|
+
command: assessment.command,
|
|
66
224
|
};
|
|
67
225
|
} catch {
|
|
68
|
-
return { present: true, globalCommand: false };
|
|
226
|
+
return { present: true, kind: 'invalid-json', globalCommand: false };
|
|
69
227
|
}
|
|
70
228
|
}
|
|
71
229
|
|
|
@@ -73,16 +231,19 @@ function inspectGlobalReadiness() {
|
|
|
73
231
|
const root = globalSkillsRoot();
|
|
74
232
|
const installed = REQUIRED_GLOBAL_SKILLS.filter((name) => existsSync(join(root, name, 'SKILL.md')));
|
|
75
233
|
const missing = REQUIRED_GLOBAL_SKILLS.filter((name) => !installed.includes(name));
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
234
|
+
const clientPaths = defaultClientConfigPaths();
|
|
235
|
+
const codex = readClientConfigState(clientPaths.codex);
|
|
236
|
+
const claude = readJsonState(clientPaths.claude);
|
|
237
|
+
const gemini = readJsonState(clientPaths.gemini);
|
|
238
|
+
const antigravity = readJsonState(clientPaths.antigravity);
|
|
239
|
+
const ready = missing.length === 0
|
|
240
|
+
&& codex.globalCommand
|
|
241
|
+
&& claude.globalCommand
|
|
242
|
+
&& gemini.globalCommand
|
|
243
|
+
&& antigravity.globalCommand;
|
|
83
244
|
const mode = ready
|
|
84
245
|
? 'ready'
|
|
85
|
-
: codex.
|
|
246
|
+
: codex.present || claude.present || gemini.present || antigravity.present
|
|
86
247
|
? 'partial'
|
|
87
248
|
: 'missing';
|
|
88
249
|
|
|
@@ -96,6 +257,7 @@ function inspectGlobalReadiness() {
|
|
|
96
257
|
codex,
|
|
97
258
|
claude,
|
|
98
259
|
gemini,
|
|
260
|
+
antigravity,
|
|
99
261
|
};
|
|
100
262
|
}
|
|
101
263
|
|
|
@@ -125,6 +287,7 @@ export function getMenuStatus(rootDir) {
|
|
|
125
287
|
?? join(process.env.SKILL_MASTER_HOME ?? join(process.env.HOME ?? process.env.USERPROFILE ?? '', '.skill-master'), 'data', 'success-learning');
|
|
126
288
|
const studyCandidates = readJson(rootDir, 'network/unapproved-skill-candidates.json');
|
|
127
289
|
const globalReadiness = inspectGlobalReadiness();
|
|
290
|
+
const bundledCatalog = inspectBundledSkillCatalog(rootDir);
|
|
128
291
|
|
|
129
292
|
return {
|
|
130
293
|
packageName: packageJson?.name ?? 'nao encontrado',
|
|
@@ -136,6 +299,7 @@ export function getMenuStatus(rootDir) {
|
|
|
136
299
|
pendingSuccessDrafts: countManifestFiles(successLearningDir),
|
|
137
300
|
studyCandidates: Array.isArray(studyCandidates?.candidates) ? studyCandidates.candidates.length : 0,
|
|
138
301
|
globalReadiness,
|
|
302
|
+
bundledCatalog,
|
|
139
303
|
};
|
|
140
304
|
}
|
|
141
305
|
|
|
@@ -157,21 +321,108 @@ function countManifestFiles(directory) {
|
|
|
157
321
|
return count;
|
|
158
322
|
}
|
|
159
323
|
|
|
324
|
+
function listBundledSkillNames(rootDir) {
|
|
325
|
+
const source = join(rootDir, 'docs', 'skill-candidates');
|
|
326
|
+
if (!existsSync(source)) {
|
|
327
|
+
return [];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const entries = readdirSync(source, { withFileTypes: true });
|
|
331
|
+
const directSkills = entries
|
|
332
|
+
.filter((entry) => entry.isDirectory() && existsSync(join(source, entry.name, 'SKILL.md')))
|
|
333
|
+
.map((entry) => entry.name);
|
|
334
|
+
|
|
335
|
+
if (directSkills.length) {
|
|
336
|
+
return Array.from(new Set(directSkills)).sort();
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return Array.from(new Set(
|
|
340
|
+
entries
|
|
341
|
+
.filter((entry) => entry.isDirectory())
|
|
342
|
+
.flatMap((entry) => {
|
|
343
|
+
const versionPath = join(source, entry.name);
|
|
344
|
+
return readdirSync(versionPath, { withFileTypes: true })
|
|
345
|
+
.filter((skillEntry) => skillEntry.isDirectory() && existsSync(join(versionPath, skillEntry.name, 'SKILL.md')))
|
|
346
|
+
.map((skillEntry) => skillEntry.name);
|
|
347
|
+
}),
|
|
348
|
+
)).sort();
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
function inspectBundledSkillCatalog(rootDir) {
|
|
352
|
+
const names = listBundledSkillNames(rootDir);
|
|
353
|
+
const categories = BUNDLED_SKILL_DOMAIN_GROUPS.map((group) => ({
|
|
354
|
+
key: group.key,
|
|
355
|
+
label: group.label,
|
|
356
|
+
count: group.skills.filter((skill) => names.includes(skill)).length,
|
|
357
|
+
}));
|
|
358
|
+
|
|
359
|
+
return {
|
|
360
|
+
total: names.length,
|
|
361
|
+
names,
|
|
362
|
+
categories,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
function formatBundledCategoryLine(catalog) {
|
|
367
|
+
if (!catalog?.categories?.length) {
|
|
368
|
+
return 'bundled skills: 0';
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return catalog.categories
|
|
372
|
+
.filter((category) => category.count > 0)
|
|
373
|
+
.map((category) => `${category.label} ${category.count}`)
|
|
374
|
+
.join(' | ');
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function resolveCommandArea(action) {
|
|
378
|
+
if (!action) {
|
|
379
|
+
return 'geral';
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
return COMMAND_AREA_LABELS[action.key] ?? 'geral';
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function formatActionCommand(action) {
|
|
386
|
+
if (!action?.command) {
|
|
387
|
+
return '';
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
return [action.command, ...(action.args ?? [])].join(' ');
|
|
391
|
+
}
|
|
392
|
+
|
|
160
393
|
export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process.execPath }) {
|
|
394
|
+
const isDevCheckout = existsSync(join(rootDir, 'tsconfig.json')) && existsSync(join(rootDir, 'src'));
|
|
395
|
+
const repoOnlyReason = 'Disponivel apenas no clone de desenvolvimento; no pacote npm use Doctor ou Status.';
|
|
396
|
+
|
|
161
397
|
return [
|
|
162
398
|
{
|
|
163
399
|
key: 'status',
|
|
164
400
|
aliases: ['status'],
|
|
165
401
|
label: 'Status local',
|
|
166
402
|
description: 'Mostra versao local, manifesto e informacoes do pacote.',
|
|
403
|
+
details: ['Nao altera arquivos.', 'Use para confirmar se o menu esta lendo a instalacao correta.'],
|
|
404
|
+
success: 'Relatorio impresso com versao, canal, skills globais e clientes configurados.',
|
|
167
405
|
command: nodeExecPath,
|
|
168
406
|
args: [currentFile, '--status'],
|
|
169
407
|
},
|
|
408
|
+
{
|
|
409
|
+
key: 'doctor',
|
|
410
|
+
aliases: ['doctor', 'diagnostico', 'verificar-menu', 'validar-menu'],
|
|
411
|
+
label: 'Doctor do menu e clientes MCP',
|
|
412
|
+
description: 'Valida pacote, binarios, skills globais e registros em Codex, Claude, Gemini e Antigravity.',
|
|
413
|
+
details: ['Seguro para outros notebooks.', 'Nao publica versao e nao mexe em configuracoes sem uma acao separada.'],
|
|
414
|
+
success: 'Mostra um relatorio GO/NO-GO com proximos comandos recomendados.',
|
|
415
|
+
command: nodeExecPath,
|
|
416
|
+
args: [join(rootDir, 'bin', 'skill-master-doctor.mjs')],
|
|
417
|
+
},
|
|
170
418
|
{
|
|
171
419
|
key: 'check',
|
|
172
420
|
aliases: ['check', 'gate'],
|
|
173
421
|
label: 'Rodar gate completo',
|
|
174
422
|
description: 'Executa build, testes e validacao de manifestos.',
|
|
423
|
+
details: ['Exige clone do repositorio com src, testes e tsconfig.', 'Nao e uma acao indicada para instalacao global via npm.'],
|
|
424
|
+
success: 'Build, testes e manifestos passam no checkout de desenvolvimento.',
|
|
425
|
+
disabledReason: isDevCheckout ? null : repoOnlyReason,
|
|
175
426
|
command: 'npm',
|
|
176
427
|
args: ['run', 'check'],
|
|
177
428
|
},
|
|
@@ -180,6 +431,9 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
180
431
|
aliases: ['build'],
|
|
181
432
|
label: 'Rodar build',
|
|
182
433
|
description: 'Compila o projeto localmente.',
|
|
434
|
+
details: ['Exige clone do repositorio com tsconfig.', 'Pacotes npm publicados ja usam dist precompilado.'],
|
|
435
|
+
success: 'dist atualizado no checkout de desenvolvimento.',
|
|
436
|
+
disabledReason: isDevCheckout ? null : repoOnlyReason,
|
|
183
437
|
command: 'npm',
|
|
184
438
|
args: ['run', 'build'],
|
|
185
439
|
},
|
|
@@ -188,6 +442,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
188
442
|
aliases: ['public-npm', 'npm', 'registry'],
|
|
189
443
|
label: 'Validar pacote no npm publico',
|
|
190
444
|
description: 'Consulta a versao publicada em registry.npmjs.org.',
|
|
445
|
+
details: ['Usa somente leitura no registry publico.', 'Bom para confirmar se outro notebook consegue instalar por npm.'],
|
|
446
|
+
success: 'Retorna a versao publicada atualmente no npmjs.',
|
|
191
447
|
command: 'npm',
|
|
192
448
|
args: [
|
|
193
449
|
'view',
|
|
@@ -201,6 +457,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
201
457
|
aliases: ['update', 'update-global'],
|
|
202
458
|
label: 'Atualizar pacote global via npm',
|
|
203
459
|
description: 'Atualiza a instalacao global e exige reinicio do cliente MCP.',
|
|
460
|
+
details: ['Roda npm install -g fora do processo MCP stdio.', 'Use antes de abrir Codex, Claude, Gemini ou Antigravity.'],
|
|
461
|
+
success: 'Pacote global atualizado para a versao latest do npm publico.',
|
|
204
462
|
command: nodeExecPath,
|
|
205
463
|
args: [join(rootDir, 'bin', 'skill-master-update.mjs')],
|
|
206
464
|
confirmMessage: 'Atualizar o pacote global agora?',
|
|
@@ -210,6 +468,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
210
468
|
aliases: ['private-registry', 'private', 'github-packages'],
|
|
211
469
|
label: 'Configurar registry privado GitHub Packages',
|
|
212
470
|
description: 'Prepara o .npmrc e valida o acesso ao pacote privado.',
|
|
471
|
+
details: ['Uso avancado para ambientes privados.', 'Nao e necessario para o pacote publico do npmjs.'],
|
|
472
|
+
success: '.npmrc configurado e validacao npm view executada.',
|
|
213
473
|
command: nodeExecPath,
|
|
214
474
|
args: ['scripts/configure-private-registry.mjs', '--validate'],
|
|
215
475
|
confirmMessage: 'Rodar a configuracao de registry privado agora?',
|
|
@@ -219,6 +479,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
219
479
|
aliases: ['activation-status', 'modo', 'modo-ativacao'],
|
|
220
480
|
label: 'Modo de ativacao atual',
|
|
221
481
|
description: 'Mostra o modo manual, balanced ou always-on-assisted configurado localmente.',
|
|
482
|
+
details: ['Nao altera configuracao.', 'Ajuda a entender quando o Skill Master deve sugerir skills.'],
|
|
483
|
+
success: 'Modo atual e caminho da configuracao impressos no terminal.',
|
|
222
484
|
command: nodeExecPath,
|
|
223
485
|
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--status'],
|
|
224
486
|
},
|
|
@@ -227,6 +489,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
227
489
|
aliases: ['set-balanced', 'balanced'],
|
|
228
490
|
label: 'Usar modo balanced',
|
|
229
491
|
description: 'Define balanced como modo padrao de ativacao do Skill Master.',
|
|
492
|
+
details: ['Recomendado para uso diario.', 'Ativa o MCP quando ha ganho claro para o prompt.'],
|
|
493
|
+
success: 'Modo balanced salvo localmente.',
|
|
230
494
|
command: nodeExecPath,
|
|
231
495
|
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--set-mode', 'balanced'],
|
|
232
496
|
},
|
|
@@ -235,6 +499,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
235
499
|
aliases: ['set-always-on', 'always-on-assisted'],
|
|
236
500
|
label: 'Usar modo always-on-assisted',
|
|
237
501
|
description: 'Define avaliacao assistida quase sempre ativa, mantendo no-op quando nao houver ganho.',
|
|
502
|
+
details: ['Mais agressivo que balanced.', 'Indicado para usuarios que querem o Skill Master avaliando quase todos os prompts.'],
|
|
503
|
+
success: 'Modo always-on-assisted salvo localmente.',
|
|
238
504
|
command: nodeExecPath,
|
|
239
505
|
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--set-mode', 'always-on-assisted'],
|
|
240
506
|
confirmMessage: 'Alterar o modo local para always-on-assisted?',
|
|
@@ -244,6 +510,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
244
510
|
aliases: ['install-global-skills', 'skills-globais', 'global-skills'],
|
|
245
511
|
label: 'Instalar skills globais do Skill Master',
|
|
246
512
|
description: 'Copia as skills amplas e morais embutidas para CODEX_HOME/skills ou ~/.codex/skills.',
|
|
513
|
+
details: ['Necessario para Codex descobrir as skills globais.', 'Pode ser reexecutado com seguranca pelo bootstrap.'],
|
|
514
|
+
success: 'Skills globais copiadas para a pasta global do usuario.',
|
|
247
515
|
command: nodeExecPath,
|
|
248
516
|
args: [join(rootDir, 'bin', 'skill-master-install-global-skills.mjs')],
|
|
249
517
|
confirmMessage: 'Instalar as skills globais embutidas neste usuario?',
|
|
@@ -252,25 +520,31 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
252
520
|
key: 'bootstrapGlobal',
|
|
253
521
|
aliases: ['bootstrap-global', 'global-bootstrap', 'ativar-global-completo'],
|
|
254
522
|
label: 'Ativar MCP global neste computador',
|
|
255
|
-
description: 'Instala
|
|
523
|
+
description: 'Instala skills globais e registra Codex, Claude, Gemini e Antigravity no mesmo passo.',
|
|
524
|
+
details: ['Acao principal para notebooks novos.', 'Depois reinicie os clientes para eles recarregarem MCP e skills.'],
|
|
525
|
+
success: 'Skills instaladas e configuracoes MCP aplicadas nos clientes encontrados.',
|
|
256
526
|
command: nodeExecPath,
|
|
257
527
|
args: [join(rootDir, 'bin', 'skill-master-bootstrap-global.mjs')],
|
|
258
528
|
confirmMessage: 'Executar o bootstrap global do Skill Master neste computador?',
|
|
259
529
|
},
|
|
260
530
|
{
|
|
261
531
|
key: 'registerClients',
|
|
262
|
-
aliases: ['register-clients', 'registrar-clientes', 'codex-claude-gemini'],
|
|
263
|
-
label: 'Registrar
|
|
264
|
-
description: 'Gera/aplica configuracoes MCP para
|
|
532
|
+
aliases: ['register-clients', 'registrar-clientes', 'codex-claude-gemini', 'antigravity'],
|
|
533
|
+
label: 'Registrar clientes MCP',
|
|
534
|
+
description: 'Gera/aplica configuracoes MCP para Codex, Claude, Gemini e Antigravity reconhecerem skill_master.',
|
|
535
|
+
details: ['Usa Node absoluto + bin/skill-master.mjs absoluto.', 'Preserva outros servidores MCP ja existentes nos JSONs.'],
|
|
536
|
+
success: 'Arquivos de configuracao mesclados com o servidor skill_master.',
|
|
265
537
|
command: nodeExecPath,
|
|
266
538
|
args: [join(rootDir, 'bin', 'skill-master-register-clients.mjs'), '--apply-all'],
|
|
267
|
-
confirmMessage: 'Aplicar registro do skill_master em Codex, Claude e
|
|
539
|
+
confirmMessage: 'Aplicar registro do skill_master em Codex, Claude, Gemini e Antigravity?',
|
|
268
540
|
},
|
|
269
541
|
{
|
|
270
542
|
key: 'promptRecommendation',
|
|
271
543
|
aliases: ['recommend-prompt', 'recomendar-prompt', 'prompt-router'],
|
|
272
544
|
label: 'Ver recomendacao para um prompt',
|
|
273
545
|
description: 'Abre um fluxo interativo para avaliar um prompt pelo router local.',
|
|
546
|
+
details: ['Ajuda a decidir se skill-master, skill_master ou skill-master-mcp deve agir.', 'Nao publica nem altera skills.'],
|
|
547
|
+
success: 'Router imprime recomendacao, modo de ativacao e gates aplicaveis.',
|
|
274
548
|
command: nodeExecPath,
|
|
275
549
|
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--route-prompt-interactive'],
|
|
276
550
|
},
|
|
@@ -279,6 +553,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
279
553
|
aliases: ['notifications', 'notificacoes', 'success-notifications'],
|
|
280
554
|
label: 'Notificacoes de skills aprendidas',
|
|
281
555
|
description: 'Mostra drafts pendentes, aprovacoes e skills externas para estudar.',
|
|
556
|
+
details: ['Use para decidir o que aprovar, estudar ou rejeitar.', 'Nao ativa skill automaticamente.'],
|
|
557
|
+
success: 'Lista de pendencias e proximas acoes exibida.',
|
|
282
558
|
command: nodeExecPath,
|
|
283
559
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--notify'],
|
|
284
560
|
},
|
|
@@ -287,6 +563,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
287
563
|
aliases: ['study-skills', 'skills-estudo', 'estudar'],
|
|
288
564
|
label: 'Skills para estudar',
|
|
289
565
|
description: 'Lista skills externas e links de criadores ainda nao aprovados.',
|
|
566
|
+
details: ['Material de estudo, nao ativacao operacional.', 'Bom para revisao humana antes de virar skill local/global.'],
|
|
567
|
+
success: 'Links e motivos de estudo exibidos.',
|
|
290
568
|
command: nodeExecPath,
|
|
291
569
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--study'],
|
|
292
570
|
},
|
|
@@ -295,6 +573,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
295
573
|
aliases: ['approval-package', 'aprovar', 'pacote-aprovacao'],
|
|
296
574
|
label: 'Gerar pacote de aprovacao humana',
|
|
297
575
|
description: 'Cria um relatorio local para revisar e aprovar skills aprendidas.',
|
|
576
|
+
details: ['Exige decisao humana antes de ativacao.', 'Inclui riscos, evidencias e recomendacao.'],
|
|
577
|
+
success: 'Pacote local de aprovacao gerado.',
|
|
298
578
|
command: nodeExecPath,
|
|
299
579
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--approval-package'],
|
|
300
580
|
},
|
|
@@ -303,6 +583,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
303
583
|
aliases: ['mark-study', 'manter-estudo'],
|
|
304
584
|
label: 'Manter skill candidata para estudo',
|
|
305
585
|
description: 'Seleciona uma candidata e registra decisao de manter para estudo.',
|
|
586
|
+
details: ['Preserva historico sem ativar a skill.', 'Use quando a fonte ainda precisa revisao.'],
|
|
587
|
+
success: 'Decisao registrada no historico local.',
|
|
306
588
|
command: nodeExecPath,
|
|
307
589
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--mark-study-interactive'],
|
|
308
590
|
},
|
|
@@ -311,6 +593,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
311
593
|
aliases: ['reject-skill', 'rejeitar-skill'],
|
|
312
594
|
label: 'Rejeitar skill candidata',
|
|
313
595
|
description: 'Seleciona uma candidata, registra rejeicao e preserva historico.',
|
|
596
|
+
details: ['Nao apaga evidencias.', 'Use quando risco, fonte ou utilidade nao passam no gate.'],
|
|
597
|
+
success: 'Rejeicao registrada com motivo.',
|
|
314
598
|
command: nodeExecPath,
|
|
315
599
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--reject-interactive'],
|
|
316
600
|
confirmMessage: 'Abrir fluxo para rejeitar uma skill candidata?',
|
|
@@ -320,6 +604,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
320
604
|
aliases: ['activate-learned-local', 'ativar-local', 'skill-local'],
|
|
321
605
|
label: 'Ativar skill aprendida no workspace',
|
|
322
606
|
description: 'Instala uma skill aprendida em .codex/skills do projeto atual.',
|
|
607
|
+
details: ['Escopo limitado ao workspace.', 'Mais conservador que ativar globalmente.'],
|
|
608
|
+
success: 'Skill copiada para .codex/skills do projeto.',
|
|
323
609
|
command: nodeExecPath,
|
|
324
610
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--activate-interactive', '--target', 'local'],
|
|
325
611
|
confirmMessage: 'Selecionar e ativar uma skill aprendida no workspace atual?',
|
|
@@ -329,6 +615,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
329
615
|
aliases: ['activate-learned-global', 'ativar-global', 'skill-global'],
|
|
330
616
|
label: 'Ativar skill aprendida global',
|
|
331
617
|
description: 'Instala uma skill aprendida em CODEX_HOME/skills ou ~/.codex/skills.',
|
|
618
|
+
details: ['Afeta todos os projetos deste usuario.', 'Use apenas depois de aprovacao humana.'],
|
|
619
|
+
success: 'Skill instalada no diretorio global de skills.',
|
|
332
620
|
command: nodeExecPath,
|
|
333
621
|
args: [join(rootDir, 'bin', 'skill-master-success-skills.mjs'), '--activate-interactive', '--target', 'global'],
|
|
334
622
|
confirmMessage: 'Selecionar e ativar uma skill aprendida como skill global deste usuario?',
|
|
@@ -338,6 +626,8 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
338
626
|
aliases: ['notion-summary', 'resumo-notion'],
|
|
339
627
|
label: 'Abrir resumo para Notion',
|
|
340
628
|
description: 'Mostra um resumo copiavel do estado de ativacao para registrar no ledger Notion.',
|
|
629
|
+
details: ['Nao escreve no Notion sozinho.', 'Gera texto de continuidade para documentacao.'],
|
|
630
|
+
success: 'Resumo pronto para registro exibido.',
|
|
341
631
|
command: nodeExecPath,
|
|
342
632
|
args: [join(rootDir, 'bin', 'skill-master-activation.mjs'), '--notion-summary'],
|
|
343
633
|
},
|
|
@@ -347,8 +637,9 @@ export function buildMenuCommands({ rootDir, currentFile, nodeExecPath = process
|
|
|
347
637
|
export function buildMenuChoices(commands) {
|
|
348
638
|
return commands.map((command) => ({
|
|
349
639
|
title: command.label,
|
|
350
|
-
description: command.description,
|
|
640
|
+
description: [command.description, command.success ? `Resultado: ${command.success}` : null].filter(Boolean).join(' '),
|
|
351
641
|
value: command.key,
|
|
642
|
+
disabled: command.disabledReason ?? false,
|
|
352
643
|
})).concat({
|
|
353
644
|
title: 'Sair',
|
|
354
645
|
description: 'Fecha o menu operacional.',
|
|
@@ -373,6 +664,7 @@ export function isInteractiveTerminal() {
|
|
|
373
664
|
|
|
374
665
|
export function formatStatusReport(status) {
|
|
375
666
|
const readiness = status.globalReadiness;
|
|
667
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
376
668
|
const lines = [
|
|
377
669
|
'Skill Master MCP - status local',
|
|
378
670
|
`Diretorio: ${status.rootDir}`,
|
|
@@ -384,9 +676,12 @@ export function formatStatusReport(status) {
|
|
|
384
676
|
`Skills externas para estudar: ${status.studyCandidates}`,
|
|
385
677
|
`Global readiness: ${readiness.ready ? 'pronto' : readiness.mode}`,
|
|
386
678
|
`Global skills instaladas: ${readiness.installed.length}/${readiness.required}`,
|
|
387
|
-
`
|
|
388
|
-
`
|
|
389
|
-
`
|
|
679
|
+
`Bundle de skills embutidas: ${bundledCatalog.total}`,
|
|
680
|
+
`Dominios do bundle: ${formatBundledCategoryLine(bundledCatalog)}`,
|
|
681
|
+
`Codex MCP robusto: ${readiness.codex.globalCommand ? 'sim' : readiness.codex.kind}`,
|
|
682
|
+
`Claude MCP robusto: ${readiness.claude.globalCommand ? 'sim' : readiness.claude.kind}`,
|
|
683
|
+
`Gemini MCP robusto: ${readiness.gemini.globalCommand ? 'sim' : readiness.gemini.kind}`,
|
|
684
|
+
`Antigravity MCP robusto: ${readiness.antigravity.globalCommand ? 'sim' : readiness.antigravity.kind}`,
|
|
390
685
|
];
|
|
391
686
|
|
|
392
687
|
if (status.versionText) {
|
|
@@ -403,8 +698,8 @@ function formatGlobalAlert(status, { useColor = false } = {}) {
|
|
|
403
698
|
return renderPanelLines(
|
|
404
699
|
[
|
|
405
700
|
colorize('GLOBAL READY', ANSI.bold, useColor),
|
|
406
|
-
'O MCP esta
|
|
407
|
-
'Codex, Claude e
|
|
701
|
+
'O MCP esta registrado de forma robusta neste computador.',
|
|
702
|
+
'Codex, Claude, Gemini e Antigravity podem iniciar com Node absoluto.',
|
|
408
703
|
'A instalacao global e as skills embutidas ja estao prontas para uso.',
|
|
409
704
|
],
|
|
410
705
|
{ color: ANSI.green, useColor },
|
|
@@ -417,7 +712,7 @@ function formatGlobalAlert(status, { useColor = false } = {}) {
|
|
|
417
712
|
colorize('ALERTA GLOBAL', ANSI.bold, useColor),
|
|
418
713
|
'Este computador ainda nao esta pronto para uso global do Skill Master.',
|
|
419
714
|
'Execute agora: skill-master-menu --run bootstrap-global --yes',
|
|
420
|
-
'Isso instala as skills globais e registra Codex, Claude e
|
|
715
|
+
'Isso instala as skills globais e registra Codex, Claude, Gemini e Antigravity com Node absoluto.',
|
|
421
716
|
],
|
|
422
717
|
{ color: ANSI.red, useColor },
|
|
423
718
|
),
|
|
@@ -441,12 +736,14 @@ function renderPanelLines(lines, { color = ANSI.cyan, useColor = false } = {}) {
|
|
|
441
736
|
}
|
|
442
737
|
|
|
443
738
|
export function formatMenuBanner(status, { useColor = false } = {}) {
|
|
739
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
444
740
|
const lines = [
|
|
445
741
|
colorize('Skill Master MCP', ANSI.bold, useColor),
|
|
446
742
|
'Menu operacional para manutencao local',
|
|
447
743
|
`Versao local ${status.semver} | canal ${status.manifestVersion}`,
|
|
448
744
|
`Pendencias: ${status.pendingSuccessDrafts} drafts | estudo: ${status.studyCandidates} links`,
|
|
449
745
|
`Global: ${status.globalReadiness.ready ? 'pronto' : 'requer instalacao global'}`,
|
|
746
|
+
`Bundle: ${bundledCatalog.total} skills | ${formatBundledCategoryLine(bundledCatalog)}`,
|
|
450
747
|
colorize('Setas + Enter para navegar', ANSI.dim, useColor),
|
|
451
748
|
];
|
|
452
749
|
return [
|
|
@@ -455,12 +752,356 @@ export function formatMenuBanner(status, { useColor = false } = {}) {
|
|
|
455
752
|
].join('\n\n');
|
|
456
753
|
}
|
|
457
754
|
|
|
755
|
+
function dnaPanelLines(tick, width, height, status, { useColor = false, compact = false } = {}) {
|
|
756
|
+
const lines = [];
|
|
757
|
+
const center = Math.floor(width / 2);
|
|
758
|
+
const graphLeft = 2;
|
|
759
|
+
const graphRight = Math.max(graphLeft + 8, width - 3);
|
|
760
|
+
const graphWidth = Math.max(10, graphRight - graphLeft + 1);
|
|
761
|
+
const radius = Math.max(3, Math.floor((graphWidth - 4) / 3.35));
|
|
762
|
+
const phase = tick / 6;
|
|
763
|
+
const bodyHeight = Math.max(compact ? 6 : 8, height - (compact ? 5 : 6));
|
|
764
|
+
const scanRow = bodyHeight > 0 ? tick % bodyHeight : 0;
|
|
765
|
+
|
|
766
|
+
lines.push(fitText(colorize('GENOME MATRIX', ANSI.bold, useColor), width));
|
|
767
|
+
lines.push(fitText(colorize(compact ? 'lab helix / scan stable' : 'procedural intelligence helix', ANSI.dim, useColor), width));
|
|
768
|
+
if (!compact) {
|
|
769
|
+
lines.push(fitText(colorize('signal map / sync locked / low flicker', ANSI.gray, useColor), width));
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
const place = (cells, col, char, color) => {
|
|
773
|
+
if (col >= 0 && col < width) cells[col] = colorize(char, color, useColor);
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
for (let row = 0; row < bodyHeight; row += 1) {
|
|
777
|
+
const angle = row * 0.49 + phase;
|
|
778
|
+
const left = Math.round(center + Math.sin(angle) * radius);
|
|
779
|
+
const right = Math.round(center + Math.sin(angle + Math.PI) * radius);
|
|
780
|
+
const min = Math.min(left, right);
|
|
781
|
+
const max = Math.max(left, right);
|
|
782
|
+
const chars = Array.from({ length: width }, () => ' ');
|
|
783
|
+
const front = Math.cos(angle) >= 0;
|
|
784
|
+
const leftColor = front ? ANSI.teal : ANSI.blue;
|
|
785
|
+
const rightColor = front ? ANSI.amber : ANSI.gray;
|
|
786
|
+
const bondColor = front ? ANSI.gray : ANSI.blue;
|
|
787
|
+
const scanActive = row === scanRow;
|
|
788
|
+
|
|
789
|
+
place(chars, graphLeft, row === 0 ? '┌' : row === bodyHeight - 1 ? '└' : '│', ANSI.gray);
|
|
790
|
+
place(chars, graphRight, row === 0 ? '┐' : row === bodyHeight - 1 ? '┘' : '│', ANSI.gray);
|
|
791
|
+
|
|
792
|
+
if (row === 0 || row === bodyHeight - 1) {
|
|
793
|
+
for (let col = graphLeft + 1; col < graphRight; col += 1) {
|
|
794
|
+
place(chars, col, '─', ANSI.gray);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
for (let col = min + 2; col < max - 1; col += 1) {
|
|
799
|
+
const rungChar = row % 4 < 2 ? '═' : '─';
|
|
800
|
+
place(chars, col, scanActive ? '█' : rungChar, scanActive ? ANSI.white : bondColor);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
place(chars, left - 1, '▓', leftColor);
|
|
804
|
+
place(chars, left, scanActive ? '█' : row % 2 === 0 ? '█' : '▓', scanActive ? ANSI.white : leftColor);
|
|
805
|
+
place(chars, left + 1, '▓', leftColor);
|
|
806
|
+
place(chars, right - 1, '▓', rightColor);
|
|
807
|
+
place(chars, right, scanActive ? '█' : row % 2 === 0 ? '█' : '▓', scanActive ? ANSI.white : rightColor);
|
|
808
|
+
place(chars, right + 1, '▓', rightColor);
|
|
809
|
+
|
|
810
|
+
if (row % 4 === 1 || row % 4 === 2) {
|
|
811
|
+
place(chars, center, scanActive ? '◆' : '◆', scanActive ? ANSI.white : ANSI.gray);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
lines.push(chars.join(''));
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
lines.push(fitText('', width));
|
|
818
|
+
lines.push(fitText(colorize(compact ? 'helix stable' : 'helix stable lattice aligned', ANSI.gray, useColor), width));
|
|
819
|
+
lines.push(fitText(colorize(compact ? `global ${status.globalReadiness.installed.length}/${status.globalReadiness.required}` : `global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} clients linked`, ANSI.amber, useColor), width));
|
|
820
|
+
|
|
821
|
+
return lines.slice(0, height).map((line) => fitText(line, width));
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
function renderMeterBar(value, total, width, { useColor = false, color = ANSI.teal } = {}) {
|
|
825
|
+
const safeTotal = Math.max(1, total);
|
|
826
|
+
const safeValue = Math.max(0, Math.min(value, safeTotal));
|
|
827
|
+
const fill = Math.round((safeValue / safeTotal) * width);
|
|
828
|
+
const filled = '█'.repeat(fill);
|
|
829
|
+
const empty = '░'.repeat(Math.max(0, width - fill));
|
|
830
|
+
return `${colorize(filled, color, useColor)}${colorize(empty, ANSI.gray, useColor)}`;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function renderSparkline(series, { useColor = false, color = ANSI.teal } = {}) {
|
|
834
|
+
const blocks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
|
835
|
+
return series.map((value) => colorize(blocks[Math.max(0, Math.min(blocks.length - 1, value))], color, useColor)).join('');
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function buildTelemetrySeries(seed, length, tick) {
|
|
839
|
+
return Array.from({ length }, (_, index) => {
|
|
840
|
+
const raw = Math.sin((index + 1 + seed) * 0.72 + tick * 0.18) + Math.cos((index + seed) * 0.33 + tick * 0.11);
|
|
841
|
+
const normalized = Math.max(0, Math.min(1, (raw + 2) / 4));
|
|
842
|
+
return Math.round(normalized * 7);
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
function buildOverviewSignalLine(status, width, tick, { useColor = false, compact = false } = {}) {
|
|
847
|
+
const signalWidth = Math.max(6, Math.min(compact ? 8 : 12, Math.floor(width / (compact ? 10 : 8))));
|
|
848
|
+
const healthWidth = Math.max(6, Math.min(compact ? 8 : 12, Math.floor(width / (compact ? 10 : 8))));
|
|
849
|
+
const signal = renderSparkline(
|
|
850
|
+
buildTelemetrySeries(status.globalReadiness.installed.length + status.pendingSuccessDrafts, signalWidth, tick),
|
|
851
|
+
{ useColor, color: ANSI.teal },
|
|
852
|
+
);
|
|
853
|
+
const health = renderSparkline(
|
|
854
|
+
buildTelemetrySeries(status.studyCandidates + (status.globalReadiness.ready ? 7 : 3), healthWidth, tick + 3),
|
|
855
|
+
{ useColor, color: ANSI.amber },
|
|
856
|
+
);
|
|
857
|
+
return compact
|
|
858
|
+
? `signal ${signal} health ${health}`
|
|
859
|
+
: `signal ${signal} health ${health}`;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
function telemetryPanelLines(status, selected, width, height, { useColor = false, tick = 0, compact = false } = {}) {
|
|
863
|
+
const commandArea = resolveCommandArea(selected);
|
|
864
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
865
|
+
const categoryLead = bundledCatalog.categories
|
|
866
|
+
?.filter((category) => category.count > 0)
|
|
867
|
+
.sort((left, right) => right.count - left.count)[0];
|
|
868
|
+
const categoryName = categoryLead?.label ?? 'none';
|
|
869
|
+
const categoryCount = categoryLead?.count ?? 0;
|
|
870
|
+
const meterWidth = Math.max(8, Math.min(16, width - 14));
|
|
871
|
+
const sparkWidth = Math.max(8, Math.min(compact ? 8 : 12, width - 18));
|
|
872
|
+
const skillsSpark = renderSparkline(buildTelemetrySeries(status.globalReadiness.installed.length + categoryCount, sparkWidth, tick), { useColor, color: ANSI.amber });
|
|
873
|
+
const draftsSpark = renderSparkline(buildTelemetrySeries(status.pendingSuccessDrafts + 2, sparkWidth, tick + 2), { useColor, color: ANSI.teal });
|
|
874
|
+
const studySpark = renderSparkline(buildTelemetrySeries(status.studyCandidates + 4, sparkWidth, tick + 4), { useColor, color: ANSI.blue });
|
|
875
|
+
const lines = [
|
|
876
|
+
fitText(colorize('SYSTEM WINDOWS', ANSI.bold, useColor), width),
|
|
877
|
+
fitText(colorize(`selected area ${commandArea}`, ANSI.gray, useColor), width),
|
|
878
|
+
fitText(colorize(`dominant skill ${categoryName} ${categoryCount}`, ANSI.gray, useColor), width),
|
|
879
|
+
fitText(`bundle ${String(bundledCatalog.total).padStart(2, '0')} ${renderMeterBar(bundledCatalog.total, Math.max(36, bundledCatalog.total), meterWidth, { useColor, color: ANSI.white })}`, width),
|
|
880
|
+
fitText(`global ${status.globalReadiness.installed.length}/${status.globalReadiness.required} ${renderMeterBar(status.globalReadiness.installed.length, status.globalReadiness.required, meterWidth, { useColor, color: ANSI.amber })}`, width),
|
|
881
|
+
fitText(`skills ${skillsSpark}`, width),
|
|
882
|
+
fitText(`drafts ${String(status.pendingSuccessDrafts).padStart(2, '0')} ${renderMeterBar(status.pendingSuccessDrafts, Math.max(6, status.pendingSuccessDrafts || 1), meterWidth, { useColor, color: ANSI.teal })}`, width),
|
|
883
|
+
fitText(`queue ${draftsSpark}`, width),
|
|
884
|
+
fitText(`study ${String(status.studyCandidates).padStart(2, '0')} ${renderMeterBar(status.studyCandidates, Math.max(8, status.studyCandidates || 1), meterWidth, { useColor, color: ANSI.blue })}`, width),
|
|
885
|
+
fitText(`links ${studySpark}`, width),
|
|
886
|
+
fitText(colorize(compact ? 'codex / claude / gemini' : 'codex / claude / gemini / antigravity', ANSI.dim, useColor), width),
|
|
887
|
+
];
|
|
888
|
+
|
|
889
|
+
return lines.slice(0, height).map((line) => fitText(line, width));
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function renderBox(lines, width, title, { useColor = false, color = ANSI.cyan, style = 'normal' } = {}) {
|
|
893
|
+
const innerWidth = Math.max(10, width - 4);
|
|
894
|
+
const titleText = title ? ` ${title.toUpperCase()} ` : '';
|
|
895
|
+
const topLeft = style === 'focus' ? '╭' : style === 'hud' ? '┏' : '┌';
|
|
896
|
+
const topRight = style === 'focus' ? '╮' : style === 'hud' ? '┓' : '┐';
|
|
897
|
+
const bottomLeft = style === 'focus' ? '╰' : style === 'hud' ? '┗' : '└';
|
|
898
|
+
const bottomRight = style === 'focus' ? '╯' : style === 'hud' ? '┛' : '┘';
|
|
899
|
+
const topFill = style === 'focus' ? '═' : '─';
|
|
900
|
+
const bottomTail = style === 'focus' ? '══' : '┄┄';
|
|
901
|
+
const top = `${topLeft}${titleText}${topFill.repeat(Math.max(0, width - 2 - titleText.length))}${topRight}`;
|
|
902
|
+
const bottom = `${bottomLeft}${topFill.repeat(Math.max(0, width - 4))}${bottomTail}${bottomRight}`;
|
|
903
|
+
const body = lines.map((line, index) => {
|
|
904
|
+
const left = index === 0
|
|
905
|
+
? (style === 'focus' ? '╞' : '├')
|
|
906
|
+
: index === lines.length - 1
|
|
907
|
+
? (style === 'focus' ? '╘' : '╰')
|
|
908
|
+
: '│';
|
|
909
|
+
const right = index === 0
|
|
910
|
+
? (style === 'focus' ? '╡' : '┤')
|
|
911
|
+
: index === lines.length - 1
|
|
912
|
+
? (style === 'focus' ? '╛' : '╯')
|
|
913
|
+
: '│';
|
|
914
|
+
return `${colorize(left, color, useColor)} ${fitText(line, innerWidth)} ${colorize(right, color, useColor)}`;
|
|
915
|
+
});
|
|
916
|
+
return [
|
|
917
|
+
colorize(top, color, useColor),
|
|
918
|
+
...body,
|
|
919
|
+
colorize(bottom, color, useColor),
|
|
920
|
+
];
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
function joinHorizontalBoxes(boxes, gutter = 2) {
|
|
924
|
+
const height = Math.max(...boxes.map((box) => box.lines.length));
|
|
925
|
+
const gap = ' '.repeat(gutter);
|
|
926
|
+
const rows = [];
|
|
927
|
+
|
|
928
|
+
for (let index = 0; index < height; index += 1) {
|
|
929
|
+
rows.push(boxes.map((box) => box.lines[index] ?? ' '.repeat(box.width)).join(gap));
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return rows;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export function formatCyberMenuFrame(status, commands, selectedIndex, tick = 0, {
|
|
936
|
+
columns = 120,
|
|
937
|
+
rows = 32,
|
|
938
|
+
useColor = false,
|
|
939
|
+
} = {}) {
|
|
940
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
941
|
+
const height = Math.max(22, Math.min(rows - 1, 42));
|
|
942
|
+
const compactMode = width < 104 || height < 27;
|
|
943
|
+
const rightWidth = compactMode ? (width >= 92 ? 28 : 26) : width >= 132 ? 44 : width >= 108 ? 38 : 30;
|
|
944
|
+
const gutter = 2;
|
|
945
|
+
const leftWidth = width - rightWidth - gutter;
|
|
946
|
+
const selected = commands[selectedIndex] ?? commands[0];
|
|
947
|
+
const actionArea = resolveCommandArea(selected);
|
|
948
|
+
const bundledCatalog = status.bundledCatalog ?? { total: 0, categories: [] };
|
|
949
|
+
const summaryOuterHeight = compactMode ? 7 : 8;
|
|
950
|
+
const bodyOuterHeight = Math.max(12, height - summaryOuterHeight - 1);
|
|
951
|
+
const detailOuterHeight = compactMode
|
|
952
|
+
? Math.min(8, Math.max(7, Math.floor(bodyOuterHeight * 0.46)))
|
|
953
|
+
: Math.min(10, Math.max(8, Math.floor(bodyOuterHeight * 0.42)));
|
|
954
|
+
const actionOuterHeight = compactMode
|
|
955
|
+
? Math.max(8, bodyOuterHeight - detailOuterHeight)
|
|
956
|
+
: Math.max(8, bodyOuterHeight - detailOuterHeight);
|
|
957
|
+
const rightBottomOuterHeight = compactMode
|
|
958
|
+
? Math.min(8, Math.max(7, Math.floor(bodyOuterHeight * 0.4)))
|
|
959
|
+
: Math.min(10, Math.max(8, Math.floor(bodyOuterHeight * 0.34)));
|
|
960
|
+
const rightTopOuterHeight = Math.max(8, bodyOuterHeight - rightBottomOuterHeight);
|
|
961
|
+
const summaryInnerWidth = width - 4;
|
|
962
|
+
const actionInnerWidth = leftWidth - 4;
|
|
963
|
+
const detailInnerWidth = leftWidth - 4;
|
|
964
|
+
const rightInnerWidth = rightWidth - 4;
|
|
965
|
+
const summaryInnerHeight = summaryOuterHeight - 2;
|
|
966
|
+
const actionInnerHeight = actionOuterHeight - 2;
|
|
967
|
+
const detailInnerHeight = detailOuterHeight - 2;
|
|
968
|
+
const rightTopInnerHeight = rightTopOuterHeight - 2;
|
|
969
|
+
const rightBottomInnerHeight = rightBottomOuterHeight - 2;
|
|
970
|
+
const visibleActionRows = Math.max(compactMode ? 2 : 3, actionInnerHeight - (compactMode ? 2 : 3));
|
|
971
|
+
const scrollStart = Math.min(
|
|
972
|
+
Math.max(0, selectedIndex - Math.floor(visibleActionRows / 2)),
|
|
973
|
+
Math.max(0, commands.length - visibleActionRows),
|
|
974
|
+
);
|
|
975
|
+
const visibleCommands = commands.slice(scrollStart, scrollStart + visibleActionRows);
|
|
976
|
+
|
|
977
|
+
const summaryLines = compactMode
|
|
978
|
+
? [
|
|
979
|
+
colorize('SKILL MASTER MENU', ANSI.bold, useColor),
|
|
980
|
+
`version ${status.semver} | channel ${status.manifestVersion} | readiness ${status.globalReadiness.ready ? 'ready' : status.globalReadiness.mode}`,
|
|
981
|
+
colorize(`GLOBAL SKILLS ${status.globalReadiness.installed.length}/${status.globalReadiness.required}`, ANSI.amber, useColor),
|
|
982
|
+
`bundle ${bundledCatalog.total} | drafts ${status.pendingSuccessDrafts} | study ${status.studyCandidates}`,
|
|
983
|
+
buildOverviewSignalLine(status, summaryInnerWidth, tick, { useColor, compact: true }),
|
|
984
|
+
colorize('compact cyberpunk hud / operator safe', ANSI.dim, useColor),
|
|
985
|
+
]
|
|
986
|
+
: [
|
|
987
|
+
colorize('SKILL MASTER MENU', ANSI.bold, useColor),
|
|
988
|
+
`version ${status.semver} | channel ${status.manifestVersion} | readiness ${status.globalReadiness.ready ? 'ready' : status.globalReadiness.mode}`,
|
|
989
|
+
colorize(`GLOBAL SKILLS ${status.globalReadiness.installed.length}/${status.globalReadiness.required}`, ANSI.amber, useColor),
|
|
990
|
+
`bundle ${bundledCatalog.total} | drafts ${status.pendingSuccessDrafts} | study ${status.studyCandidates}`,
|
|
991
|
+
buildOverviewSignalLine(status, summaryInnerWidth, tick, { useColor, compact: false }),
|
|
992
|
+
formatBundledCategoryLine(bundledCatalog),
|
|
993
|
+
colorize('workflow windows / cyberpunk terminal / operator safe', ANSI.dim, useColor),
|
|
994
|
+
];
|
|
995
|
+
|
|
996
|
+
const actionLines = [
|
|
997
|
+
colorize('ACTION GRID', ANSI.gray, useColor),
|
|
998
|
+
colorize('up/down move enter run q exit', ANSI.dim, useColor),
|
|
999
|
+
...visibleCommands.map((command, offset) => {
|
|
1000
|
+
const index = scrollStart + offset;
|
|
1001
|
+
const marker = index === selectedIndex ? '▸' : '·';
|
|
1002
|
+
const disabled = command.disabledReason ? ' [off]' : '';
|
|
1003
|
+
const label = `${marker} ${command.label}${disabled}`;
|
|
1004
|
+
return index === selectedIndex
|
|
1005
|
+
? colorize(fitText(label, actionInnerWidth), ANSI.teal, useColor)
|
|
1006
|
+
: fitText(label, actionInnerWidth);
|
|
1007
|
+
}),
|
|
1008
|
+
];
|
|
1009
|
+
|
|
1010
|
+
while (actionLines.length < actionInnerHeight) {
|
|
1011
|
+
actionLines.push(fitText('', actionInnerWidth));
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
const descriptionLines = [
|
|
1015
|
+
colorize('DETAIL FOCUS', ANSI.amber, useColor),
|
|
1016
|
+
colorize(selected?.label ?? 'Nenhuma acao', ANSI.bold, useColor),
|
|
1017
|
+
fitText(colorize(`area ${actionArea} | action ${Math.min(selectedIndex + 1, commands.length)}/${commands.length}`, ANSI.gray, useColor), detailInnerWidth),
|
|
1018
|
+
fitText(colorize('────────────────────────────────', ANSI.amber, useColor), detailInnerWidth),
|
|
1019
|
+
...splitText(selected?.description, detailInnerWidth, 1),
|
|
1020
|
+
...splitText(selected?.success ? `resultado: ${selected.success}` : '', detailInnerWidth, 1),
|
|
1021
|
+
...splitText(`exec: ${formatActionCommand(selected)}`, detailInnerWidth, 1),
|
|
1022
|
+
...(selected?.confirmMessage ? splitText(`confirmacao: ${selected.confirmMessage}`, detailInnerWidth, 2) : []),
|
|
1023
|
+
...(selected?.disabledReason ? splitText(`Indisponivel: ${selected.disabledReason}`, detailInnerWidth, 2) : []),
|
|
1024
|
+
];
|
|
1025
|
+
|
|
1026
|
+
while (descriptionLines.length < detailInnerHeight) {
|
|
1027
|
+
descriptionLines.push(fitText('', detailInnerWidth));
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
const rightTopLines = dnaPanelLines(tick, rightInnerWidth, rightTopInnerHeight, status, { useColor, compact: compactMode });
|
|
1031
|
+
const rightBottomLines = telemetryPanelLines(status, selected, rightInnerWidth, rightBottomInnerHeight, { useColor, tick, compact: compactMode });
|
|
1032
|
+
const summaryBox = renderBox(
|
|
1033
|
+
summaryLines.slice(0, summaryInnerHeight).map((line) => fitText(line, summaryInnerWidth)),
|
|
1034
|
+
width,
|
|
1035
|
+
'overview',
|
|
1036
|
+
{ useColor, color: ANSI.white, style: 'hud' },
|
|
1037
|
+
);
|
|
1038
|
+
const actionBox = renderBox(
|
|
1039
|
+
actionLines.slice(0, actionInnerHeight).map((line) => fitText(line, actionInnerWidth)),
|
|
1040
|
+
leftWidth,
|
|
1041
|
+
'actions',
|
|
1042
|
+
{ useColor, color: ANSI.gray, style: 'normal' },
|
|
1043
|
+
);
|
|
1044
|
+
const detailBox = renderBox(
|
|
1045
|
+
descriptionLines.slice(0, detailInnerHeight).map((line) => fitText(line, detailInnerWidth)),
|
|
1046
|
+
leftWidth,
|
|
1047
|
+
'details',
|
|
1048
|
+
{ useColor, color: ANSI.amber, style: 'focus' },
|
|
1049
|
+
);
|
|
1050
|
+
const dnaBox = renderBox(rightTopLines, rightWidth, 'dna-core', { useColor, color: ANSI.white, style: 'hud' });
|
|
1051
|
+
const telemetryBox = renderBox(rightBottomLines, rightWidth, 'telemetry', { useColor, color: ANSI.blue, style: 'normal' });
|
|
1052
|
+
const bodyRows = joinHorizontalBoxes([
|
|
1053
|
+
{ lines: [...actionBox, ...detailBox], width: leftWidth },
|
|
1054
|
+
{ lines: [...dnaBox, ...telemetryBox], width: rightWidth },
|
|
1055
|
+
], gutter);
|
|
1056
|
+
|
|
1057
|
+
return [...summaryBox, '', ...bodyRows].join('\n');
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export function formatRunningActionFrame(status, action, tick = 0, {
|
|
1061
|
+
columns = 120,
|
|
1062
|
+
rows = 32,
|
|
1063
|
+
useColor = false,
|
|
1064
|
+
} = {}) {
|
|
1065
|
+
const width = Math.max(72, Math.min(columns, 150));
|
|
1066
|
+
const height = Math.max(18, Math.min(rows - 1, 30));
|
|
1067
|
+
const innerWidth = width - 4;
|
|
1068
|
+
const commandArea = resolveCommandArea(action);
|
|
1069
|
+
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 });
|
|
1070
|
+
const lines = [
|
|
1071
|
+
colorize('EXECUTION TRANSFER', ANSI.bold, useColor),
|
|
1072
|
+
fitText(colorize(`area ${commandArea} | launching ${action?.label ?? 'acao'}`, ANSI.amber, useColor), innerWidth),
|
|
1073
|
+
fitText(colorize(`pulse ${pulse}`, ANSI.gray, useColor), innerWidth),
|
|
1074
|
+
fitText('', innerWidth),
|
|
1075
|
+
...splitText(action?.description ?? '', innerWidth, 2),
|
|
1076
|
+
...splitText(action?.success ? `resultado esperado: ${action.success}` : '', innerWidth, 2),
|
|
1077
|
+
...splitText(`exec: ${formatActionCommand(action)}`, innerWidth, 2),
|
|
1078
|
+
fitText('', innerWidth),
|
|
1079
|
+
fitText(colorize('alternando do HUD para o stream real do comando...', ANSI.dim, useColor), innerWidth),
|
|
1080
|
+
];
|
|
1081
|
+
|
|
1082
|
+
while (lines.length < Math.max(8, height - 2)) {
|
|
1083
|
+
lines.push(fitText('', innerWidth));
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
return renderBox(
|
|
1087
|
+
lines.slice(0, Math.max(8, height - 2)).map((line) => fitText(line, innerWidth)),
|
|
1088
|
+
width,
|
|
1089
|
+
'running',
|
|
1090
|
+
{ useColor, color: ANSI.teal, style: 'focus' },
|
|
1091
|
+
).join('\n');
|
|
1092
|
+
}
|
|
1093
|
+
|
|
458
1094
|
export function formatActionHeader(action, { useColor = false } = {}) {
|
|
1095
|
+
const lines = [
|
|
1096
|
+
colorize(action.label, ANSI.bold, useColor),
|
|
1097
|
+
action.description,
|
|
1098
|
+
...(action.details ?? []),
|
|
1099
|
+
action.success ? `Resultado esperado: ${action.success}` : null,
|
|
1100
|
+
action.disabledReason ? `Indisponivel: ${action.disabledReason}` : null,
|
|
1101
|
+
].filter(Boolean);
|
|
1102
|
+
|
|
459
1103
|
return renderPanelLines(
|
|
460
|
-
|
|
461
|
-
colorize(action.label, ANSI.bold, useColor),
|
|
462
|
-
action.description,
|
|
463
|
-
],
|
|
1104
|
+
lines,
|
|
464
1105
|
{ color: ANSI.green, useColor },
|
|
465
1106
|
);
|
|
466
1107
|
}
|
|
@@ -474,7 +1115,11 @@ export function formatResultMessage(code, { useColor = false } = {}) {
|
|
|
474
1115
|
}
|
|
475
1116
|
|
|
476
1117
|
export function formatHelp(commands) {
|
|
477
|
-
const actionList = commands.map((command) =>
|
|
1118
|
+
const actionList = commands.map((command) => {
|
|
1119
|
+
const aliases = command.aliases.length ? ` aliases: ${command.aliases.join(', ')}` : '';
|
|
1120
|
+
const disabled = command.disabledReason ? ` indisponivel: ${command.disabledReason}` : '';
|
|
1121
|
+
return ` - ${command.key}: ${command.label}\n ${command.description}${aliases}${disabled}`;
|
|
1122
|
+
}).join('\n');
|
|
478
1123
|
|
|
479
1124
|
return `Skill Master Menu
|
|
480
1125
|
|