winter-super-cli 2026.5.15
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/CLAUDE.md +118 -0
- package/README.md +81 -0
- package/WINTER.md +30 -0
- package/bin/winter.js +269 -0
- package/memories/readme.md +35 -0
- package/package.json +33 -0
- package/resources/local/agents.md/AGENTS.md +43 -0
- package/resources/local/agents.md/LICENSE +21 -0
- package/resources/local/agents.md/README.md +49 -0
- package/resources/local/agents.md/components/AboutSection.tsx +37 -0
- package/resources/local/agents.md/components/CodeExample.tsx +207 -0
- package/resources/local/agents.md/components/CompatibilitySection.tsx +378 -0
- package/resources/local/agents.md/components/ExampleListSection.tsx +188 -0
- package/resources/local/agents.md/components/ExamplesSection.tsx +22 -0
- package/resources/local/agents.md/components/FAQSection.tsx +113 -0
- package/resources/local/agents.md/components/Footer.tsx +17 -0
- package/resources/local/agents.md/components/Hero.tsx +230 -0
- package/resources/local/agents.md/components/HowToUseSection.tsx +66 -0
- package/resources/local/agents.md/components/Section.tsx +44 -0
- package/resources/local/agents.md/components/ThreeCanvas.tsx +240 -0
- package/resources/local/agents.md/components/WhySection.tsx +64 -0
- package/resources/local/agents.md/components/icons/ClipboardIcon.tsx +27 -0
- package/resources/local/agents.md/components/icons/CopyIcon.tsx +15 -0
- package/resources/local/agents.md/components/icons/GitHubIcon.tsx +24 -0
- package/resources/local/agents.md/components/icons/LinkIcon.tsx +27 -0
- package/resources/local/agents.md/components/icons/UserIcon.tsx +27 -0
- package/resources/local/agents.md/next.config.ts +8 -0
- package/resources/local/agents.md/package.json +27 -0
- package/resources/local/agents.md/pages/_app.tsx +24 -0
- package/resources/local/agents.md/pages/_document.tsx +24 -0
- package/resources/local/agents.md/pages/index.tsx +160 -0
- package/resources/local/agents.md/pnpm-lock.yaml +2782 -0
- package/resources/local/agents.md/postcss.config.mjs +5 -0
- package/resources/local/agents.md/public/favicon-dark.png +0 -0
- package/resources/local/agents.md/public/favicon-light.png +0 -0
- package/resources/local/agents.md/public/favicon.ico +0 -0
- package/resources/local/agents.md/public/logos/aider.svg +16 -0
- package/resources/local/agents.md/public/logos/amp.svg +5 -0
- package/resources/local/agents.md/public/logos/augment.svg +9 -0
- package/resources/local/agents.md/public/logos/codex.svg +3 -0
- package/resources/local/agents.md/public/logos/copilot.svg +1 -0
- package/resources/local/agents.md/public/logos/cursor.svg +15 -0
- package/resources/local/agents.md/public/logos/devin-dark.svg +1 -0
- package/resources/local/agents.md/public/logos/devin-light.svg +1 -0
- package/resources/local/agents.md/public/logos/factory.svg +3 -0
- package/resources/local/agents.md/public/logos/gemini.svg +27 -0
- package/resources/local/agents.md/public/logos/goose.svg +12 -0
- package/resources/local/agents.md/public/logos/jules.svg +3 -0
- package/resources/local/agents.md/public/logos/junie.svg +5 -0
- package/resources/local/agents.md/public/logos/kilo-code.svg +43 -0
- package/resources/local/agents.md/public/logos/ona-dark.svg +3 -0
- package/resources/local/agents.md/public/logos/ona-light.svg +3 -0
- package/resources/local/agents.md/public/logos/opencode.svg +40 -0
- package/resources/local/agents.md/public/logos/phoenix.svg +44 -0
- package/resources/local/agents.md/public/logos/roocode.svg +3 -0
- package/resources/local/agents.md/public/logos/semgrep.svg +7 -0
- package/resources/local/agents.md/public/logos/uipath.svg +6 -0
- package/resources/local/agents.md/public/logos/vscode-dark.svg +19 -0
- package/resources/local/agents.md/public/logos/vscode-light.svg +12 -0
- package/resources/local/agents.md/public/logos/warp.svg +7 -0
- package/resources/local/agents.md/public/logos/windsurf-dark.svg +3 -0
- package/resources/local/agents.md/public/logos/windsurf-light.svg +3 -0
- package/resources/local/agents.md/public/logos/zed.svg +3 -0
- package/resources/local/agents.md/public/og.png +0 -0
- package/resources/local/agents.md/styles/globals.css +415 -0
- package/resources/local/agents.md/tsconfig.json +34 -0
- package/resources/local/awesome-design-md/README.md +197 -0
- package/resources/local/awesome-design-md/design-md/airbnb/DESIGN.md +545 -0
- package/resources/local/awesome-design-md/design-md/airbnb/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/airtable/DESIGN.md +554 -0
- package/resources/local/awesome-design-md/design-md/airtable/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/apple/DESIGN.md +562 -0
- package/resources/local/awesome-design-md/design-md/apple/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/binance/DESIGN.md +634 -0
- package/resources/local/awesome-design-md/design-md/binance/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/bmw/DESIGN.md +544 -0
- package/resources/local/awesome-design-md/design-md/bmw/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/bmw-m/DESIGN.md +503 -0
- package/resources/local/awesome-design-md/design-md/bmw-m/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/bugatti/DESIGN.md +454 -0
- package/resources/local/awesome-design-md/design-md/bugatti/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/cal/DESIGN.md +542 -0
- package/resources/local/awesome-design-md/design-md/cal/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/claude/DESIGN.md +589 -0
- package/resources/local/awesome-design-md/design-md/claude/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/clay/DESIGN.md +541 -0
- package/resources/local/awesome-design-md/design-md/clay/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/clickhouse/DESIGN.md +544 -0
- package/resources/local/awesome-design-md/design-md/clickhouse/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/cohere/DESIGN.md +451 -0
- package/resources/local/awesome-design-md/design-md/cohere/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/coinbase/DESIGN.md +570 -0
- package/resources/local/awesome-design-md/design-md/coinbase/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/composio/DESIGN.md +506 -0
- package/resources/local/awesome-design-md/design-md/composio/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/cursor/DESIGN.md +537 -0
- package/resources/local/awesome-design-md/design-md/cursor/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/elevenlabs/DESIGN.md +504 -0
- package/resources/local/awesome-design-md/design-md/elevenlabs/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/expo/DESIGN.md +526 -0
- package/resources/local/awesome-design-md/design-md/expo/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/ferrari/DESIGN.md +531 -0
- package/resources/local/awesome-design-md/design-md/ferrari/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/figma/DESIGN.md +578 -0
- package/resources/local/awesome-design-md/design-md/figma/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/framer/DESIGN.md +544 -0
- package/resources/local/awesome-design-md/design-md/framer/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/hashicorp/DESIGN.md +575 -0
- package/resources/local/awesome-design-md/design-md/hashicorp/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/ibm/DESIGN.md +550 -0
- package/resources/local/awesome-design-md/design-md/ibm/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/intercom/DESIGN.md +546 -0
- package/resources/local/awesome-design-md/design-md/intercom/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/kraken/DESIGN.md +125 -0
- package/resources/local/awesome-design-md/design-md/kraken/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/lamborghini/DESIGN.md +288 -0
- package/resources/local/awesome-design-md/design-md/lamborghini/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/linear.app/DESIGN.md +548 -0
- package/resources/local/awesome-design-md/design-md/linear.app/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/lovable/DESIGN.md +298 -0
- package/resources/local/awesome-design-md/design-md/lovable/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/mastercard/DESIGN.md +365 -0
- package/resources/local/awesome-design-md/design-md/mastercard/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/meta/DESIGN.md +683 -0
- package/resources/local/awesome-design-md/design-md/meta/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/minimax/DESIGN.md +746 -0
- package/resources/local/awesome-design-md/design-md/minimax/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/mintlify/DESIGN.md +852 -0
- package/resources/local/awesome-design-md/design-md/mintlify/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/miro/DESIGN.md +825 -0
- package/resources/local/awesome-design-md/design-md/miro/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/mistral.ai/DESIGN.md +773 -0
- package/resources/local/awesome-design-md/design-md/mistral.ai/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/mongodb/DESIGN.md +767 -0
- package/resources/local/awesome-design-md/design-md/mongodb/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/nike/DESIGN.md +575 -0
- package/resources/local/awesome-design-md/design-md/nike/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/notion/DESIGN.md +821 -0
- package/resources/local/awesome-design-md/design-md/notion/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/nvidia/DESIGN.md +640 -0
- package/resources/local/awesome-design-md/design-md/nvidia/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/ollama/DESIGN.md +539 -0
- package/resources/local/awesome-design-md/design-md/ollama/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/opencode.ai/DESIGN.md +521 -0
- package/resources/local/awesome-design-md/design-md/opencode.ai/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/pinterest/DESIGN.md +597 -0
- package/resources/local/awesome-design-md/design-md/pinterest/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/playstation/DESIGN.md +661 -0
- package/resources/local/awesome-design-md/design-md/playstation/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/posthog/DESIGN.md +690 -0
- package/resources/local/awesome-design-md/design-md/posthog/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/raycast/DESIGN.md +669 -0
- package/resources/local/awesome-design-md/design-md/raycast/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/renault/DESIGN.md +589 -0
- package/resources/local/awesome-design-md/design-md/renault/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/replicate/DESIGN.md +616 -0
- package/resources/local/awesome-design-md/design-md/replicate/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/resend/DESIGN.md +585 -0
- package/resources/local/awesome-design-md/design-md/resend/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/revolut/DESIGN.md +636 -0
- package/resources/local/awesome-design-md/design-md/revolut/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/runwayml/DESIGN.md +244 -0
- package/resources/local/awesome-design-md/design-md/runwayml/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/sanity/DESIGN.md +357 -0
- package/resources/local/awesome-design-md/design-md/sanity/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/sentry/DESIGN.md +262 -0
- package/resources/local/awesome-design-md/design-md/sentry/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/shopify/DESIGN.md +350 -0
- package/resources/local/awesome-design-md/design-md/shopify/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/spacex/DESIGN.md +194 -0
- package/resources/local/awesome-design-md/design-md/spacex/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/spotify/DESIGN.md +246 -0
- package/resources/local/awesome-design-md/design-md/spotify/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/starbucks/DESIGN.md +580 -0
- package/resources/local/awesome-design-md/design-md/starbucks/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/stripe/DESIGN.md +322 -0
- package/resources/local/awesome-design-md/design-md/stripe/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/supabase/DESIGN.md +255 -0
- package/resources/local/awesome-design-md/design-md/supabase/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/superhuman/DESIGN.md +252 -0
- package/resources/local/awesome-design-md/design-md/superhuman/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/tesla/DESIGN.md +286 -0
- package/resources/local/awesome-design-md/design-md/tesla/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/theverge/DESIGN.md +339 -0
- package/resources/local/awesome-design-md/design-md/theverge/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/together.ai/DESIGN.md +263 -0
- package/resources/local/awesome-design-md/design-md/together.ai/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/uber/DESIGN.md +295 -0
- package/resources/local/awesome-design-md/design-md/uber/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/vercel/DESIGN.md +310 -0
- package/resources/local/awesome-design-md/design-md/vercel/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/vodafone/DESIGN.md +423 -0
- package/resources/local/awesome-design-md/design-md/vodafone/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/voltagent/DESIGN.md +323 -0
- package/resources/local/awesome-design-md/design-md/voltagent/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/warp/DESIGN.md +253 -0
- package/resources/local/awesome-design-md/design-md/warp/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/webflow/DESIGN.md +92 -0
- package/resources/local/awesome-design-md/design-md/webflow/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/wired/DESIGN.md +278 -0
- package/resources/local/awesome-design-md/design-md/wired/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/wise/DESIGN.md +173 -0
- package/resources/local/awesome-design-md/design-md/wise/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/x.ai/DESIGN.md +257 -0
- package/resources/local/awesome-design-md/design-md/x.ai/README.md +5 -0
- package/resources/local/awesome-design-md/design-md/zapier/DESIGN.md +328 -0
- package/resources/local/awesome-design-md/design-md/zapier/README.md +5 -0
- package/resources/local/awesome-design-md/design-md-cli.js +167 -0
- package/resources/local/claude/plugins/blocklist.json +17 -0
- package/resources/local/claude/plugins/installed_plugins.json +37 -0
- package/resources/local/claude/plugins/known_marketplaces.json +18 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/.claude-plugin/marketplace.json +55 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/README.md +94 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/THIRD_PARTY_NOTICES.md +405 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/algorithmic-art/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/algorithmic-art/SKILL.md +405 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/algorithmic-art/templates/viewer.html +599 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/brand-guidelines/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/brand-guidelines/SKILL.md +73 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/SKILL.md +130 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/SKILL.md +324 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/csharp/claude-api.md +402 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/curl/examples.md +216 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/curl/managed-agents.md +336 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/go/claude-api.md +421 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/go/managed-agents/README.md +561 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/java/claude-api.md +432 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/java/managed-agents/README.md +442 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/php/claude-api.md +375 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/php/managed-agents/README.md +435 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/claude-api/README.md +420 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/claude-api/batches.md +185 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/claude-api/files-api.md +165 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/claude-api/streaming.md +162 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/claude-api/tool-use.md +590 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/python/managed-agents/README.md +332 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/ruby/claude-api.md +113 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/agent-design.md +101 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/error-codes.md +213 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/live-sources.md +132 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-api-reference.md +337 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-core.md +218 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-events.md +189 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-overview.md +64 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/model-migration.md +779 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/models.md +121 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/prompt-caching.md +171 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/shared/tool-use-concepts.md +327 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/claude-api/README.md +333 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/claude-api/batches.md +106 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/claude-api/files-api.md +98 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/claude-api/streaming.md +178 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/claude-api/tool-use.md +527 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/doc-coauthoring/SKILL.md +375 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/LICENSE.txt +30 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/SKILL.md +590 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/__init__.py +1 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/accept_changes.py +135 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/comment.py +318 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/pack.py +159 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/soffice.py +183 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/unpack.py +132 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validate.py +111 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validators/base.py +847 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validators/docx.py +446 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/templates/comments.xml +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/docx/scripts/templates/people.xml +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/frontend-design/LICENSE.txt +177 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/frontend-design/SKILL.md +42 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/SKILL.md +32 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/examples/3p-updates.md +47 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/examples/faq-answers.md +30 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/internal-comms/examples/general-comms.md +16 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/SKILL.md +236 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/reference/evaluation.md +602 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/scripts/connections.py +151 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/LICENSE.txt +30 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/SKILL.md +314 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/forms.md +294 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/reference.md +612 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/create_validation_image.py +37 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/LICENSE.txt +30 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/SKILL.md +232 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/editing.md +205 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/pptxgenjs.md +420 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/add_slide.py +195 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/clean.py +286 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/pack.py +159 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/soffice.py +183 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/unpack.py +132 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validate.py +111 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validators/base.py +847 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/pptx/scripts/thumbnail.py +289 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/SKILL.md +485 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/agents/analyzer.md +274 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/agents/comparator.md +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/agents/grader.md +223 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/assets/eval_review.html +146 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/references/schemas.md +430 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/generate_report.py +326 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/improve_description.py +247 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/package_skill.py +136 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/run_eval.py +310 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/run_loop.py +328 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/skill-creator/scripts/utils.py +47 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/SKILL.md +254 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/core/easing.py +234 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/core/validators.py +136 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/slack-gif-creator/requirements.txt +4 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/SKILL.md +59 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/theme-showcase.pdf +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/desert-rose.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/golden-hour.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/web-artifacts-builder/SKILL.md +74 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/SKILL.md +96 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/examples/console_logging.py +35 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/webapp-testing/scripts/with_server.py +106 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/LICENSE.txt +30 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/SKILL.md +292 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/pack.py +159 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/soffice.py +183 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/unpack.py +132 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validate.py +111 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/skills/xlsx/scripts/recalc.py +184 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/spec/agent-skills-spec.md +3 -0
- package/resources/local/claude/plugins/marketplaces/anthropic-agent-skills/template/SKILL.md +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json +1724 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/.gcs-sha +1 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/README.md +51 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/asana/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/asana/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/context7/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/context7/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/.claude-plugin/plugin.json +11 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/.mcp.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/ACCESS.md +143 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/README.md +112 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/bun.lock +244 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/package.json +14 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/server.ts +900 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/skills/access/SKILL.md +137 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/discord/skills/configure/SKILL.md +99 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/.claude-plugin/plugin.json +13 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/.mcp.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/README.md +47 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/bun.lock +206 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/package.json +16 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/server.ts +295 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/firebase/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/firebase/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/github/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/github/.mcp.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/gitlab/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/gitlab/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/greptile/.claude-plugin/plugin.json +10 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/greptile/.mcp.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/greptile/README.md +57 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/.claude-plugin/plugin.json +11 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/.mcp.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/ACCESS.md +142 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/README.md +84 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/bun.lock +207 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/package.json +17 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/server.ts +875 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/skills/access/SKILL.md +140 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/imessage/skills/configure/SKILL.md +82 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/laravel-boost/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/laravel-boost/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/linear/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/linear/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/playwright/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/playwright/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/serena/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/serena/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.claude-plugin/plugin.json +11 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/.mcp.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/ACCESS.md +147 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/README.md +99 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/bun.lock +212 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/package.json +14 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/server.ts +1032 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/skills/access/SKILL.md +136 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/skills/configure/SKILL.md +96 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/terraform/.claude-plugin/plugin.json +7 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/external_plugins/terraform/.mcp.json +12 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/README.md +208 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/agents/agent-sdk-verifier-py.md +140 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/agents/agent-sdk-verifier-ts.md +145 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/agent-sdk-dev/commands/new-sdk-app.md +176 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/clangd-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/clangd-lsp/README.md +36 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/README.md +29 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/automation-recommender-example.png +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/SKILL.md +288 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/references/skills-reference.md +408 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-code-setup/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/README.md +40 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/claude-md-improver-example.png +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/commands/revise-claude-md.md +54 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/revise-claude-md-example.png +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/skills/claude-md-improver/SKILL.md +179 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/skills/claude-md-improver/references/quality-criteria.md +109 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/skills/claude-md-improver/references/templates.md +253 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/claude-md-management/skills/claude-md-improver/references/update-guidelines.md +150 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-review/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-review/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-review/README.md +246 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-review/commands/code-review.md +92 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-simplifier/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-simplifier/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/code-simplifier/agents/code-simplifier.md +52 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/README.md +225 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/commands/clean_gone.md +53 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/commands/commit-push-pr.md +20 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/commit-commands/commands/commit.md +17 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/csharp-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/csharp-lsp/README.md +25 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/.mcp.json +6 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/README.md +69 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/commands/example-command.md +39 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/skills/example-command/SKILL.md +39 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/example-plugin/skills/example-skill/SKILL.md +84 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/explanatory-output-style/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/explanatory-output-style/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/explanatory-output-style/README.md +72 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/explanatory-output-style/hooks/hooks.json +15 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/explanatory-output-style/hooks-handlers/session-start.sh +15 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/README.md +412 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/agents/code-architect.md +34 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/agents/code-explorer.md +51 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/agents/code-reviewer.md +46 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/feature-dev/commands/feature-dev.md +125 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/frontend-design/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/frontend-design/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/frontend-design/README.md +31 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/frontend-design/skills/frontend-design/SKILL.md +42 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/gopls-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/gopls-lsp/README.md +20 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/README.md +340 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/agents/conversation-analyzer.md +176 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/commands/configure.md +128 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/commands/help.md +175 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/commands/hookify.md +231 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/commands/list.md +82 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/core/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/core/config_loader.py +297 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/core/rule_engine.py +313 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/examples/console-log-warning.local.md +14 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/examples/dangerous-rm.local.md +14 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/examples/require-tests-stop.local.md +22 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/examples/sensitive-files-warning.local.md +18 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/hooks.json +49 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/posttooluse.py +62 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/pretooluse.py +66 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/stop.py +55 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/hooks/userpromptsubmit.py +54 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/matchers/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/skills/writing-rules/SKILL.md +374 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/hookify/utils/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/jdtls-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/jdtls-lsp/README.md +33 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/kotlin-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/kotlin-lsp/README.md +16 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/learning-output-style/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/learning-output-style/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/learning-output-style/README.md +93 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/learning-output-style/hooks/hooks.json +15 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/learning-output-style/hooks-handlers/session-start.sh +15 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/lua-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/lua-lsp/README.md +32 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/README.md +40 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/SKILL.md +411 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/evals/trigger_eval.json +23 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/adversarial_prompts.md +293 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/attempt_agent.md +63 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/known_constructions.md +46 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/model_tier_defaults.md +66 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/presentation_prompts.md +153 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/solver_heuristics.md +135 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/references/verifier_patterns.md +206 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/scripts/check_latex.sh +4 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/math-olympiad/skills/math-olympiad/scripts/compile_pdf.sh +54 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/README.md +32 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md +361 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-app/references/apps-sdk-messages.md +160 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-app/references/iframe-sandbox.md +149 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-app/references/widget-templates.md +249 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/SKILL.md +221 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/auth.md +108 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/deploy-cloudflare-workers.md +106 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/elicitation.md +129 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/remote-http-scaffold.md +211 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/resources-and-prompts.md +122 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/server-capabilities.md +164 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/tool-design.md +189 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcp-server/references/versions.md +25 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcpb/SKILL.md +199 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcpb/references/local-security.md +149 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/mcp-server-dev/skills/build-mcpb/references/manifest-schema.md +156 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/php-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/php-lsp/README.md +24 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/README.md +28 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/SKILL.md +76 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/code-map.md +158 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/concept-map.md +73 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/data-explorer.md +67 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/design-playground.md +67 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/diff-review.md +179 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/playground/skills/playground/templates/document-critique.md +171 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/README.md +402 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/agents/agent-creator.md +176 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/agents/plugin-validator.md +184 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/agents/skill-reviewer.md +184 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/commands/create-plugin.md +449 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/SKILL.md +415 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/examples/agent-creation-prompt.md +238 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/examples/complete-agent-examples.md +427 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/references/agent-creation-system-prompt.md +207 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/references/system-prompt-design.md +411 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/references/triggering-examples.md +491 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/agent-development/scripts/validate-agent.sh +217 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/README.md +272 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/SKILL.md +884 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/examples/plugin-commands.md +557 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/examples/simple-commands.md +504 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/advanced-workflows.md +722 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/documentation-patterns.md +739 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/frontmatter-reference.md +463 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/interactive-commands.md +920 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/marketplace-considerations.md +904 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/plugin-features-reference.md +609 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/command-development/references/testing-strategies.md +702 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/SKILL.md +712 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/examples/load-context.sh +55 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/examples/validate-bash.sh +43 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/examples/validate-write.sh +38 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/references/advanced.md +479 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/references/migration.md +369 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/references/patterns.md +346 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/scripts/README.md +164 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/scripts/test-hook.sh +252 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/SKILL.md +554 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/examples/http-server.json +20 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/examples/sse-server.json +19 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/examples/stdio-server.json +26 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/references/authentication.md +549 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/references/server-types.md +536 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/mcp-integration/references/tool-usage.md +538 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/SKILL.md +544 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/examples/create-settings-command.md +98 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/examples/example-settings.md +159 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/examples/read-settings-hook.sh +65 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/references/parsing-techniques.md +549 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/references/real-world-examples.md +395 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/scripts/parse-frontmatter.sh +59 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-settings/scripts/validate-settings.sh +101 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/README.md +109 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/SKILL.md +476 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/examples/advanced-plugin.md +765 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md +83 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/examples/standard-plugin.md +587 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/references/component-patterns.md +567 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/plugin-structure/references/manifest-reference.md +552 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/skill-development/SKILL.md +637 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/skill-development/references/skill-creator-original.md +209 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/README.md +313 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/code-reviewer.md +47 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/code-simplifier.md +88 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/comment-analyzer.md +70 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/pr-test-analyzer.md +69 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/silent-failure-hunter.md +130 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/agents/type-design-analyzer.md +110 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pr-review-toolkit/commands/review-pr.md +189 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pyright-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/pyright-lsp/README.md +31 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/.claude-plugin/plugin.json +9 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/README.md +197 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/commands/cancel-ralph.md +18 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/commands/help.md +126 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/commands/ralph-loop.md +18 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/hooks.json +15 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/hooks/stop-hook.sh +191 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop/scripts/setup-ralph-loop.sh +204 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ruby-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/ruby-lsp/README.md +31 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/rust-analyzer-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/rust-analyzer-lsp/README.md +34 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/security-guidance/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/security-guidance/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/security-guidance/hooks/hooks.json +16 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/security-guidance/hooks/security_reminder_hook.py +280 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/session-report/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/session-report/skills/session-report/SKILL.md +42 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/session-report/skills/session-report/analyze-sessions.mjs +875 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/session-report/skills/session-report/template.html +569 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/.claude-plugin/plugin.json +8 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/README.md +3 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/LICENSE.txt +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/SKILL.md +479 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/agents/analyzer.md +274 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/agents/comparator.md +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/agents/grader.md +223 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/assets/eval_review.html +146 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/references/schemas.md +430 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/__init__.py +0 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/generate_report.py +326 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/improve_description.py +248 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/package_skill.py +136 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/run_eval.py +310 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/run_loop.py +332 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/scripts/utils.py +47 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/swift-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/swift-lsp/README.md +25 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/typescript-lsp/LICENSE +202 -0
- package/resources/local/claude/plugins/marketplaces/claude-plugins-official/plugins/typescript-lsp/README.md +24 -0
- package/resources/local/claude/settings.json +33 -0
- package/resources/local/claude/skills/skill-creator/SKILL.md +39 -0
- package/resources/local/claude/skills/vercel-react-best-practices/AGENTS.md +2410 -0
- package/resources/local/claude/skills/vercel-react-best-practices/SKILL.md +125 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +49 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/async-dependencies.md +36 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +57 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/resources/local/claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/resources/local/claude/skills/web-design-guidelines/SKILL.md +39 -0
- package/resources/local/claude/todos/022bdc3c-e2c0-4a20-a74f-b348ed022c75-agent-022bdc3c-e2c0-4a20-a74f-b348ed022c75.json +1 -0
- package/resources/local/claude/todos/316f0e7d-5512-49fa-8c7f-edc75b777612-agent-316f0e7d-5512-49fa-8c7f-edc75b777612.json +1 -0
- package/resources/local/claude/todos/3676dc17-fca1-4692-934b-ce35e1965af6-agent-3676dc17-fca1-4692-934b-ce35e1965af6.json +1 -0
- package/resources/local/claude/todos/464493de-7f2a-45cf-93e8-ad73214afa10-agent-464493de-7f2a-45cf-93e8-ad73214afa10.json +1 -0
- package/resources/local/claude/todos/51f2e7a7-3f31-4692-a9b2-d3f3906aafea-agent-51f2e7a7-3f31-4692-a9b2-d3f3906aafea.json +1 -0
- package/resources/local/claude/todos/64a67dce-3d62-4a98-a548-b9c91a8e87e8-agent-64a67dce-3d62-4a98-a548-b9c91a8e87e8.json +1 -0
- package/resources/local/claude/todos/727a06e6-0ac2-41ca-8b81-2c14e4d40182-agent-727a06e6-0ac2-41ca-8b81-2c14e4d40182.json +1 -0
- package/resources/local/claude/todos/7d34d296-9b5a-4525-9b68-600d2ae20b59-agent-7d34d296-9b5a-4525-9b68-600d2ae20b59.json +1 -0
- package/resources/local/claude/todos/8c0606f1-5bcc-4176-8125-c5174fd69002-agent-8c0606f1-5bcc-4176-8125-c5174fd69002.json +1 -0
- package/resources/local/claude/todos/905aab16-5225-43f6-8ae4-c94491fd3a6f-agent-905aab16-5225-43f6-8ae4-c94491fd3a6f.json +1 -0
- package/resources/local/claude/todos/9dbe93f0-d62c-4c12-b4eb-0eecc437d625-agent-9dbe93f0-d62c-4c12-b4eb-0eecc437d625.json +1 -0
- package/resources/local/claude/todos/ad48500f-02a5-4f18-970b-82fb595d171f-agent-ad48500f-02a5-4f18-970b-82fb595d171f.json +1 -0
- package/resources/local/claude/todos/af86ea71-9907-4066-907c-68055e6c0081-agent-af86ea71-9907-4066-907c-68055e6c0081.json +1 -0
- package/resources/local/claude/todos/dbb0dc16-5d71-4f1d-a56c-db0741b3d485-agent-dbb0dc16-5d71-4f1d-a56c-db0741b3d485.json +1 -0
- package/resources/local/claude/todos/ff1ac487-eb0f-4c63-9360-fbb0a81bb5ae-agent-ff1ac487-eb0f-4c63-9360-fbb0a81bb5ae.json +1 -0
- package/resources/local/codex/AGENTS.md +0 -0
- package/resources/local/codex/config.toml +84 -0
- package/resources/local/codex/memories/MEMORY.md +972 -0
- package/resources/local/codex/memories/extensions/ad_hoc/instructions.md +13 -0
- package/resources/local/codex/memories/memory_summary.md +188 -0
- package/resources/local/codex/memories/raw_memories.md +1488 -0
- package/resources/local/codex/memories/rollout_summaries/2026-03-27T04-05-14-Iirb-nsis_full_installer_build_cpp_ocr_translator.md +46 -0
- package/resources/local/codex/memories/rollout_summaries/2026-03-28T06-18-17-Si3U-my_translator_overlay_lockfix_portable_nsis.md +112 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-15T06-42-11-2JMi-qelasy_timeout_and_watch_control_stability.md +90 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-16T03-12-59-z6Wi-request_all_row_click_detail_navigation.md +42 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-17T05-49-03-tNBk-my_translator_project_readability_audio_latency_clear_button.md +75 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-21T04-05-04-EXnh-nsis_packaging_harfbuzz_dll_qml_runtime_debug.md +108 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T03-48-40-VnNG-openclaw_opencode_sync_and_runtime_repair.md +86 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T06-49-49-R8yZ-web_book_user_portal_and_lint_fixes.md +82 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T06-50-35-ZaS1-smoke_admin_rbac_refund_connection_refused.md +35 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T11-05-04-aotT-nextjs_build_fix_statswidget_leaflet_ssr.md +78 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T03-22-24-a5q4-ui_still_looks_cloudflare_only.md +41 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T04-35-47-amlb-bayre247_hero_slide_above_search_form.md +49 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T04-59-21-lZWv-ocr_backend_parity_easyocr_tesseract_paddle_fallback.md +92 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T07-36-22-tPuo-request_workflow_editor_drag_edge_smaller_arrows_roadmap.md +72 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-24T08-01-05-Gb3B-checkin_shifts_workdays_assignments_and_checkout_overhaul.md +90 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-25T03-39-02-mbDr-web_book_refund_admin_popup_pagination_responsiveness.md +151 -0
- package/resources/local/codex/memories/rollout_summaries/2026-04-25T09-20-30-4usS-tool_scv_9router_custom_provider_and_paddle_ocr.md +130 -0
- package/resources/local/codex/memories/rollout_summaries/2026-05-06T10-19-38-mt2X-find_db_config_in_web_book_app_env.md +40 -0
- package/resources/local/codex/memories/rollout_summaries/2026-05-06T11-10-23-TkwP-goirong_backend_title_crash_and_client_audio_tcp_tunnel_debu.md +85 -0
- package/resources/local/codex/memories/rollout_summaries/2026-05-09T07-52-18-On1F-chakra_git_cleanup_readme_bilingual_publish_config.md +88 -0
- package/resources/local/codex/memories/rollout_summaries/2026-05-11T08-05-34-oMEl-check_crack_gui_logo_onefile_build.md +68 -0
- package/resources/local/codex/memories/skills/windows-packaged-app-smoke-check/SKILL.md +72 -0
- package/resources/local/codex/models_cache.json +395 -0
- package/resources/local/codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/.codex-plugin/plugin.json +42 -0
- package/resources/local/codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/assets/browser.png +0 -0
- package/resources/local/codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/scripts/browser-client.mjs +177 -0
- package/resources/local/codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/skills/browser/SKILL.md +734 -0
- package/resources/local/codex/plugins/cache/openai-bundled/browser-use/0.1.0-alpha1/skills/browser/agents/openai.yaml +4 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/.codex-plugin/plugin.json +49 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/README.md +17 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/assets/icon.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/assets/logo.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/LICENSE.txt +19 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/SKILL.md +400 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/agents/openai.yaml +7 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/assets/file-document.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/examples/end_to_end_smoke_test.md +32 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/manifest.txt +72 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/ooxml/comments.md +37 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/ooxml/hyperlinks_and_fields.md +69 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/ooxml/rels_and_content_types.md +37 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/ooxml/tracked_changes.md +41 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/references/design_presets.md +243 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/references/header_templates.md +373 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/render_docx.py +392 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/a11y_audit.py +372 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/accept_tracked_changes.py +180 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/add_tracked_replacements.py +190 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/apply_template_styles.py +131 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/captions_and_crossrefs.py +305 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/comments_add.py +260 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/comments_apply_patch.py +156 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/comments_extract.py +168 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/comments_strip.py +151 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/content_controls.py +358 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/docx_ooxml_patch.py +649 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/docx_table_to_csv.py +72 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/fields_materialize.py +310 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/fields_report.py +182 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/flatten_ref_fields.py +154 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/footnotes_report.py +99 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/heading_audit.py +103 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/images_audit.py +171 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/insert_note.py +244 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/insert_ref_fields.py +239 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/insert_toc.py +154 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/internal_nav.py +365 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/make_fixtures.py +258 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/merge_docx_append.py +110 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/privacy_scrub.py +176 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/redact_docx.py +315 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/render_and_diff.py +165 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/section_audit.py +86 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/set_protection.py +149 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/style_lint.py +170 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/style_normalize.py +187 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/table_geometry.py +270 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/watermark_add.py +170 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/watermark_audit_remove.py +145 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/scripts/xlsx_to_docx_table.py +179 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/accessibility_a11y.md +55 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/captions_crossrefs.md +97 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/clean_tracked_changes.md +44 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/comments_manage.md +71 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/compare_diff.md +32 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/create_edit.md +47 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/fields_update.md +66 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/fixtures_edge_cases.md +42 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/footnotes_endnotes.md +52 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/forms_content_controls.md +49 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/headings_numbering.md +44 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/images_figures.md +35 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/multi_doc_merge.md +31 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/navigation_internal_links.md +62 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/privacy_scrub_metadata.md +24 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/protection_restrict_editing.md +36 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/read_review.md +60 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/redaction_anonymization.md +57 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/sections_layout.md +62 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/style_lint_normalize.md +70 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/tables_spreadsheets.md +36 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/templates_style_packs.md +34 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/toc_workflow.md +61 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/verify_render.md +54 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/tasks/watermarks_background.md +35 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/troubleshooting/libreoffice_headless.md +42 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/documents/26.505.10851/skills/documents/troubleshooting/run_splitting.md +15 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/.codex-plugin/plugin.json +48 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/README.md +17 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/assets/icon.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/assets/logo.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/SKILL.md +743 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/agents/openai.yaml +7 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/assets/file-presentation.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/appendix-heavy.md +24 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/consumer-retail.md +59 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/engineering-platform.md +30 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/finance-ir.md +33 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/gtm-growth.md +30 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/product-platform.md +31 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/profiles/template-and-edit.md +153 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/artifact_tool_utils.mjs +504 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/build_artifact_deck.mjs +209 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/check_icon_manifest.mjs +138 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/check_layout_quality.mjs +495 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/cleanup_presentation_workspace.mjs +164 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/create_reference_slide.py +96 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/create_reference_slides.py +264 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/inspect_template_deck.mjs +216 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/make_contact_sheet.py +58 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/openai_generate_image.py +146 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/prepare_template_starter_deck.mjs +229 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/render_artifact_slide.mjs +105 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/render_lucide_icon.mjs +229 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/scripts/run_prompt_battle.mjs +872 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/subagent-instructions.md +128 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/templates/design-system-template.md +107 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/templates/icon-manifest-template.json +38 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/presentations/26.505.10851/skills/presentations/templates/visual-qa-template.md +114 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/.codex-plugin/plugin.json +48 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/README.md +17 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/assets/icon.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/assets/logo.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/SKILL.md +607 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/agents/openai.yaml +7 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/assets/file-spreadsheet.png +0 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/charts.md +31 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/style_guidelines.md +99 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/templates/financial_models.md +121 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/templates/healthcare.md +33 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/templates/marketing_advertising.md +31 -0
- package/resources/local/codex/plugins/cache/openai-primary-runtime/spreadsheets/26.505.10851/skills/spreadsheets/templates/scientific_research.md +19 -0
- package/resources/local/codex/rules/default.rules +13 -0
- package/resources/local/codex/skills/.system/.codex-system-skills.marker +1 -0
- package/resources/local/codex/skills/.system/imagegen/LICENSE.txt +201 -0
- package/resources/local/codex/skills/.system/imagegen/SKILL.md +356 -0
- package/resources/local/codex/skills/.system/imagegen/agents/openai.yaml +6 -0
- package/resources/local/codex/skills/.system/imagegen/assets/imagegen-small.svg +5 -0
- package/resources/local/codex/skills/.system/imagegen/assets/imagegen.png +0 -0
- package/resources/local/codex/skills/.system/imagegen/references/cli.md +242 -0
- package/resources/local/codex/skills/.system/imagegen/references/codex-network.md +33 -0
- package/resources/local/codex/skills/.system/imagegen/references/image-api.md +90 -0
- package/resources/local/codex/skills/.system/imagegen/references/prompting.md +118 -0
- package/resources/local/codex/skills/.system/imagegen/references/sample-prompts.md +433 -0
- package/resources/local/codex/skills/.system/imagegen/scripts/image_gen.py +995 -0
- package/resources/local/codex/skills/.system/imagegen/scripts/remove_chroma_key.py +440 -0
- package/resources/local/codex/skills/.system/openai-docs/LICENSE.txt +201 -0
- package/resources/local/codex/skills/.system/openai-docs/SKILL.md +88 -0
- package/resources/local/codex/skills/.system/openai-docs/agents/openai.yaml +14 -0
- package/resources/local/codex/skills/.system/openai-docs/assets/openai-small.svg +3 -0
- package/resources/local/codex/skills/.system/openai-docs/assets/openai.png +0 -0
- package/resources/local/codex/skills/.system/openai-docs/references/latest-model.md +37 -0
- package/resources/local/codex/skills/.system/openai-docs/references/prompting-guide.md +244 -0
- package/resources/local/codex/skills/.system/openai-docs/references/upgrade-guide.md +181 -0
- package/resources/local/codex/skills/.system/openai-docs/scripts/resolve-latest-model-info.js +147 -0
- package/resources/local/codex/skills/.system/plugin-creator/SKILL.md +160 -0
- package/resources/local/codex/skills/.system/plugin-creator/agents/openai.yaml +6 -0
- package/resources/local/codex/skills/.system/plugin-creator/assets/plugin-creator-small.svg +3 -0
- package/resources/local/codex/skills/.system/plugin-creator/assets/plugin-creator.png +0 -0
- package/resources/local/codex/skills/.system/plugin-creator/references/plugin-json-spec.md +170 -0
- package/resources/local/codex/skills/.system/plugin-creator/scripts/create_basic_plugin.py +301 -0
- package/resources/local/codex/skills/.system/skill-creator/SKILL.md +416 -0
- package/resources/local/codex/skills/.system/skill-creator/agents/openai.yaml +5 -0
- package/resources/local/codex/skills/.system/skill-creator/assets/skill-creator-small.svg +3 -0
- package/resources/local/codex/skills/.system/skill-creator/assets/skill-creator.png +0 -0
- package/resources/local/codex/skills/.system/skill-creator/license.txt +202 -0
- package/resources/local/codex/skills/.system/skill-creator/references/openai_yaml.md +49 -0
- package/resources/local/codex/skills/.system/skill-creator/scripts/generate_openai_yaml.py +226 -0
- package/resources/local/codex/skills/.system/skill-creator/scripts/init_skill.py +400 -0
- package/resources/local/codex/skills/.system/skill-creator/scripts/quick_validate.py +101 -0
- package/resources/local/codex/skills/.system/skill-installer/LICENSE.txt +202 -0
- package/resources/local/codex/skills/.system/skill-installer/SKILL.md +58 -0
- package/resources/local/codex/skills/.system/skill-installer/agents/openai.yaml +5 -0
- package/resources/local/codex/skills/.system/skill-installer/assets/skill-installer-small.svg +3 -0
- package/resources/local/codex/skills/.system/skill-installer/assets/skill-installer.png +0 -0
- package/resources/local/codex/skills/.system/skill-installer/scripts/github_utils.py +21 -0
- package/resources/local/codex/skills/.system/skill-installer/scripts/install-skill-from-github.py +308 -0
- package/resources/local/codex/skills/.system/skill-installer/scripts/list-skills.py +107 -0
- package/resources/local/codex/skills/vibefigma/SKILL.md +87 -0
- package/resources/local/codex/skills/vibefigma/references/responsive-cleanup.md +180 -0
- package/resources/local/karpathy-tools/CLAUDE.md +65 -0
- package/resources/local/karpathy-tools/karpathy-md.js +140 -0
- package/resources/local/manifest.json +57 -0
- package/rules/default.md +107 -0
- package/skills/coding.md +87 -0
- package/skills/debug.md +63 -0
- package/skills/test.md +64 -0
- package/src/ai/providers.js +427 -0
- package/src/ai/providers.test.js +102 -0
- package/src/cache/system.js +157 -0
- package/src/cli/commands.js +359 -0
- package/src/cli/config.js +94 -0
- package/src/cli/repl.js +2214 -0
- package/src/cli/repl.test.js +167 -0
- package/src/cli/snowflake-logo.js +106 -0
- package/src/design/commands.js +187 -0
- package/src/plugins/manager.js +146 -0
- package/src/session/manager.js +279 -0
- package/src/skills/manager.js +183 -0
- package/src/tools/executor.js +877 -0
- package/src/tools/executor.test.js +37 -0
package/src/cli/repl.js
ADDED
|
@@ -0,0 +1,2214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ❄️ WINTER REPL ❄️
|
|
3
|
+
* Claude Code / Codex style interactive REPL
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import readline from 'readline';
|
|
7
|
+
import { promises as fs } from 'fs';
|
|
8
|
+
import { homedir } from 'os';
|
|
9
|
+
import { welcomeBanner, colors } from './snowflake-logo.js';
|
|
10
|
+
import { ToolExecutor } from '../tools/executor.js';
|
|
11
|
+
import { SessionManager } from '../session/manager.js';
|
|
12
|
+
import { AIProviderManager } from '../ai/providers.js';
|
|
13
|
+
import { ConfigLoader } from './config.js';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import { highlight } from 'cli-highlight';
|
|
16
|
+
|
|
17
|
+
// All slash commands (like Claude Code)
|
|
18
|
+
const SLASH_COMMANDS = [
|
|
19
|
+
// Project
|
|
20
|
+
{ cmd: '/project', desc: 'Show/set current project' },
|
|
21
|
+
{ cmd: '/cd', desc: 'Change directory' },
|
|
22
|
+
{ cmd: '/pwd', desc: 'Show current directory' },
|
|
23
|
+
// Session
|
|
24
|
+
{ cmd: '/session', desc: 'Session management' },
|
|
25
|
+
{ cmd: '/sessions', desc: 'List all sessions' },
|
|
26
|
+
{ cmd: '/clear', desc: 'Clear screen' },
|
|
27
|
+
// Memory
|
|
28
|
+
{ cmd: '/remember', desc: 'Store in memory', usage: '/remember <text>' },
|
|
29
|
+
{ cmd: '/memories', desc: 'Show stored memories' },
|
|
30
|
+
{ cmd: '/forget', desc: 'Clear memories', usage: '/forget [pattern]' },
|
|
31
|
+
// Plans
|
|
32
|
+
{ cmd: '/plan', desc: 'Create/view plans' },
|
|
33
|
+
{ cmd: '/plans', desc: 'List active plans' },
|
|
34
|
+
// Tasks
|
|
35
|
+
{ cmd: '/tasks', desc: 'List tasks' },
|
|
36
|
+
{ cmd: '/task', desc: 'Create task', usage: '/task <description>' },
|
|
37
|
+
{ cmd: '/agent', desc: 'Launch subagent', usage: '/agent <task>' },
|
|
38
|
+
// Tools
|
|
39
|
+
{ cmd: '/read', desc: 'Read file', usage: '/read <file>' },
|
|
40
|
+
{ cmd: '/write', desc: 'Write file', usage: '/write <file> <content>' },
|
|
41
|
+
{ cmd: '/glob', desc: 'Find files', usage: '/glob <pattern>' },
|
|
42
|
+
{ cmd: '/grep', desc: 'Search files', usage: '/grep <pattern>' },
|
|
43
|
+
{ cmd: '/bash', desc: 'Run command', usage: '/bash <command>' },
|
|
44
|
+
{ cmd: '/image', desc: 'Analyze image/screenshot', usage: '/image <file> [question]' },
|
|
45
|
+
// Design
|
|
46
|
+
{ cmd: '/design', desc: 'Design commands', sub: ['search', 'add', 'list', 'preview'] },
|
|
47
|
+
{ cmd: '/designs', desc: 'List/search awesome-design-md systems', usage: '/designs [query]' },
|
|
48
|
+
// Skills
|
|
49
|
+
{ cmd: '/skill', desc: 'Skills management', sub: ['list', 'enable', 'create'] },
|
|
50
|
+
{ cmd: '/skills', desc: 'List local Winter/Codex/Claude skills' },
|
|
51
|
+
// Plugins
|
|
52
|
+
{ cmd: '/plugin', desc: 'Plugin management', sub: ['list', 'install', 'remove'] },
|
|
53
|
+
// Local agent resources
|
|
54
|
+
{ cmd: '/codex', desc: 'Browse ~/.codex resources', usage: '/codex [skills|plugins|models|rules|memories]' },
|
|
55
|
+
{ cmd: '/claude', desc: 'Browse ~/.claude resources', usage: '/claude [skills|plugins|settings]' },
|
|
56
|
+
{ cmd: '/karpathy', desc: 'Browse karpathy-tools and guidelines' },
|
|
57
|
+
{ cmd: '/agents', desc: 'Read ~/agents.md' },
|
|
58
|
+
{ cmd: '/resources', desc: 'Show bundled local resource manifest' },
|
|
59
|
+
// Provider
|
|
60
|
+
{ cmd: '/provider', desc: 'Show/switch AI provider', usage: '/provider <custom|claude|ollama|openai|groq>' },
|
|
61
|
+
{ cmd: '/providers', desc: 'List all providers' },
|
|
62
|
+
{ cmd: '/models', desc: 'List configured/cached models' },
|
|
63
|
+
// Config
|
|
64
|
+
{ cmd: '/config', desc: 'Show configuration' },
|
|
65
|
+
{ cmd: '/model', desc: 'Show/set active provider model', usage: '/model <model-id>' },
|
|
66
|
+
// Help & Exit
|
|
67
|
+
{ cmd: '/help', desc: 'Show this help' },
|
|
68
|
+
{ cmd: '/?', desc: 'Show help' },
|
|
69
|
+
{ cmd: '/exit', desc: 'Exit Winter' },
|
|
70
|
+
{ cmd: '/quit', desc: 'Exit Winter' },
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
function formatMarkdown(text) {
|
|
75
|
+
if (!text) return '';
|
|
76
|
+
let formatted = text;
|
|
77
|
+
|
|
78
|
+
formatted = formatted.replace(/```(\w*)\n([\s\S]*?)```/g, (match, lang, code) => {
|
|
79
|
+
const label = lang || 'code';
|
|
80
|
+
let coloredCode = code.trimEnd();
|
|
81
|
+
try {
|
|
82
|
+
coloredCode = highlight(coloredCode, { language: lang || 'javascript', ignoreIllegals: true });
|
|
83
|
+
} catch (e) {
|
|
84
|
+
// Fallback
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const columns = process.stdout.columns || 80;
|
|
88
|
+
const W = Math.max(60, Math.min(Math.floor(columns * 0.95), 100));
|
|
89
|
+
const headerLine = '─'.repeat(Math.max(0, W - label.length - 4));
|
|
90
|
+
const bottomLine = '─'.repeat(W);
|
|
91
|
+
|
|
92
|
+
return `\n${colors.dim}┌─ ${label} ${headerLine}${colors.reset}\n${coloredCode}\n${colors.dim}└${bottomLine}${colors.reset}\n${colors.white}`;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Bold
|
|
96
|
+
formatted = formatted.replace(/\*\*(.*?)\*\*/g, `${colors.bright}$1${colors.reset}${colors.white}`);
|
|
97
|
+
|
|
98
|
+
// Italic
|
|
99
|
+
formatted = formatted.replace(/(?<!\*)\*([^*\n]+)\*(?!\*)/g, `${colors.italic || colors.dim}$1${colors.reset}${colors.white}`);
|
|
100
|
+
|
|
101
|
+
// Inline code
|
|
102
|
+
formatted = formatted.replace(/`([^`\n]+)`/g, `${colors.cyan}$1${colors.reset}${colors.white}`);
|
|
103
|
+
|
|
104
|
+
// Headings
|
|
105
|
+
formatted = formatted.replace(/^### (.+)$/gm, `${colors.cyan} $1${colors.reset}`);
|
|
106
|
+
formatted = formatted.replace(/^## (.+)$/gm, `${colors.cyan}${colors.bright} $1${colors.reset}`);
|
|
107
|
+
formatted = formatted.replace(/^# (.+)$/gm, `\n${colors.bright}${colors.cyan}━ $1${colors.reset}\n`);
|
|
108
|
+
|
|
109
|
+
// Horizontal rules
|
|
110
|
+
formatted = formatted.replace(/^---+$/gm, `${colors.dim}${'─'.repeat(50)}${colors.reset}`);
|
|
111
|
+
|
|
112
|
+
// Unordered list bullets
|
|
113
|
+
formatted = formatted.replace(/^(\s*)[-*] /gm, `$1${colors.cyan}•${colors.reset} `);
|
|
114
|
+
|
|
115
|
+
// Numbered list
|
|
116
|
+
formatted = formatted.replace(/^(\s*)(\d+)\. /gm, `$1${colors.cyan}$2.${colors.reset} `);
|
|
117
|
+
|
|
118
|
+
return formatted;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class Spinner {
|
|
122
|
+
constructor(text = '') {
|
|
123
|
+
this.text = text;
|
|
124
|
+
this.frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
125
|
+
this.interval = null;
|
|
126
|
+
this.frameIndex = 0;
|
|
127
|
+
}
|
|
128
|
+
start() {
|
|
129
|
+
if (this.interval) return;
|
|
130
|
+
this.interval = setInterval(() => {
|
|
131
|
+
process.stdout.write(`\r\x1b[K${colors.cyan}${this.frames[this.frameIndex]}${colors.reset} ${colors.dim}${this.text}${colors.reset}`);
|
|
132
|
+
this.frameIndex = (this.frameIndex + 1) % this.frames.length;
|
|
133
|
+
}, 80);
|
|
134
|
+
}
|
|
135
|
+
stop(finalText) {
|
|
136
|
+
if (this.interval) {
|
|
137
|
+
clearInterval(this.interval);
|
|
138
|
+
this.interval = null;
|
|
139
|
+
process.stdout.write(`\r\x1b[K${finalText ? finalText + '\n' : ''}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
update(text) {
|
|
143
|
+
this.text = text;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export class WinterREPL {
|
|
148
|
+
constructor(options = {}) {
|
|
149
|
+
this.config = new ConfigLoader();
|
|
150
|
+
this.session = new SessionManager(this.config);
|
|
151
|
+
this.ai = new AIProviderManager(this.config);
|
|
152
|
+
this.tools = new ToolExecutor(this);
|
|
153
|
+
this.projectPath = options.projectPath || process.cwd();
|
|
154
|
+
this.sessionId = options.sessionId || null; // Nhận sessionId từ bin
|
|
155
|
+
this.version = options.version || '1.0.0'; // Nhận version từ bin
|
|
156
|
+
this.running = true;
|
|
157
|
+
this.history = [];
|
|
158
|
+
this.maxHistory = 500;
|
|
159
|
+
this.slashMenu = { open: false, line: '', items: [], selected: 0 };
|
|
160
|
+
this.inputQueue = Promise.resolve();
|
|
161
|
+
this.readlineClosed = false;
|
|
162
|
+
this.taskQueue = [];
|
|
163
|
+
this.isProcessing = false;
|
|
164
|
+
this.isCancelled = false;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async start() {
|
|
168
|
+
await this.session.init({ project: this.projectPath, sessionId: this.sessionId });
|
|
169
|
+
await this.ai.init();
|
|
170
|
+
|
|
171
|
+
// Tự động đọc và ghi nhớ 3 file hệ thống theo yêu cầu của user
|
|
172
|
+
const filesToAutoLoad = [
|
|
173
|
+
'e:\\\\dev\\\\app\\\\winter\\\\resources\\\\local\\\\agents.md',
|
|
174
|
+
'e:\\\\dev\\\\app\\\\winter\\\\resources\\\\local\\\\awesome-design-md',
|
|
175
|
+
'e:\\\\dev\\\\app\\\\winter\\\\resources\\\\local\\\\karpathy-tools'
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
const fsPromises = await import('fs/promises');
|
|
179
|
+
const path = await import('path');
|
|
180
|
+
|
|
181
|
+
for (const filePath of filesToAutoLoad) {
|
|
182
|
+
try {
|
|
183
|
+
const content = await fsPromises.readFile(filePath, 'utf8');
|
|
184
|
+
const fileName = path.basename(filePath);
|
|
185
|
+
const memoryKey = `[Tự động ghi nhớ file ${fileName}]`;
|
|
186
|
+
|
|
187
|
+
// Xóa memory cũ về file này để cập nhật nội dung mới nhất (tránh trùng lặp)
|
|
188
|
+
const currentMemories = this.session.getMemory() || [];
|
|
189
|
+
const filteredMemories = currentMemories.filter(m => !m.startsWith(memoryKey));
|
|
190
|
+
|
|
191
|
+
// Cập nhật lại mảng memory trong session
|
|
192
|
+
this.session.memory = filteredMemories;
|
|
193
|
+
|
|
194
|
+
// Thêm nội dung mới vào bộ nhớ
|
|
195
|
+
this.session.addMemory(`${memoryKey}:\n${content}`);
|
|
196
|
+
console.log(`${colors.dim}ℹ Đã tự động nạp và ghi nhớ file ${fileName}${colors.reset}`);
|
|
197
|
+
} catch (e) {
|
|
198
|
+
// Bỏ qua nếu không đọc được file
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Kiểm tra và nạp file winter.md của dự án
|
|
203
|
+
const projectWinterMd = path.join(this.projectPath, 'winter.md');
|
|
204
|
+
try {
|
|
205
|
+
await fsPromises.access(projectWinterMd);
|
|
206
|
+
const content = await fsPromises.readFile(projectWinterMd, 'utf8');
|
|
207
|
+
|
|
208
|
+
const memoryKey = `[Quy tắc dự án từ winter.md]`;
|
|
209
|
+
this.session.memory = (this.session.getMemory() || []).filter(m => !m.startsWith(memoryKey));
|
|
210
|
+
this.session.addMemory(`${memoryKey}:\n${content}`);
|
|
211
|
+
console.log(`${colors.dim}ℹ Đã nạp quy tắc dự án từ winter.md${colors.reset}`);
|
|
212
|
+
} catch (e) {
|
|
213
|
+
// Nếu không có, tự động tạo file mẫu!
|
|
214
|
+
const template = `# Winter Project Rules
|
|
215
|
+
|
|
216
|
+
## 📝 Project Overview
|
|
217
|
+
- **Name**: [Tên dự án]
|
|
218
|
+
- **Description**: [Mô tả ngắn về dự án]
|
|
219
|
+
|
|
220
|
+
## 🛠 Tech Stack
|
|
221
|
+
- **Languages**: JavaScript / TypeScript
|
|
222
|
+
- **Runtime**: Node.js
|
|
223
|
+
- **Frameworks**: [Tự điền nếu có, VD: Express, React...]
|
|
224
|
+
|
|
225
|
+
## 🎯 AI Behavior & Coding Guidelines
|
|
226
|
+
|
|
227
|
+
### 1. Nguyên Tắc Code (Coding Standards)
|
|
228
|
+
- Luôn ưu tiên viết code sạch (Clean Code), dễ đọc và dễ bảo trì.
|
|
229
|
+
- Sử dụng ES Modules (\`import/export\`) thay vì CommonJS (\`require\`) trừ khi có lý do đặc biệt.
|
|
230
|
+
- Giữ nguyên các comment và JSDoc hiện có trong file trừ khi được yêu cầu sửa.
|
|
231
|
+
|
|
232
|
+
### 2. Tương Tác Với Người Dùng (User Interaction)
|
|
233
|
+
- Luôn giải thích NGẮN GỌN lý do thực hiện thay đổi trước khi sửa file.
|
|
234
|
+
- Khi gặp lỗi, hãy đề xuất giải pháp thay vì chỉ báo lỗi.
|
|
235
|
+
- KHÔNG tự tiện xóa code cũ của user trừ khi chắc chắn nó không còn dùng hoặc được yêu cầu.
|
|
236
|
+
|
|
237
|
+
### 3. Git & Commits
|
|
238
|
+
- Viết commit message theo chuẩn Conventional Commits (VD: \`feat:\`, \`fix:\`, \`docs:\`).
|
|
239
|
+
- Luôn kiểm tra \`git status\` trước khi thực hiện thay đổi lớn.
|
|
240
|
+
|
|
241
|
+
### 4. Xử Lý File (File Operations)
|
|
242
|
+
- Chỉ sửa những dòng cần thiết, tránh viết lại toàn bộ file nếu không cần.
|
|
243
|
+
- Luôn đảm bảo file không bị lỗi cú pháp sau khi sửa.
|
|
244
|
+
`;
|
|
245
|
+
try {
|
|
246
|
+
await fsPromises.writeFile(projectWinterMd, template, 'utf8');
|
|
247
|
+
console.log(`\n${colors.green}✓ Đã tự động tạo file winter.md mẫu cho dự án mới!${colors.reset}`);
|
|
248
|
+
console.log(`${colors.dim}Bạn có thể chỉnh sửa file này để dạy AI các quy tắc riêng của dự án.${colors.reset}\n`);
|
|
249
|
+
|
|
250
|
+
// Nạp luôn vào memory
|
|
251
|
+
this.session.addMemory(`[Quy tắc dự án từ winter.md]:\n${template}`);
|
|
252
|
+
} catch (err) {
|
|
253
|
+
// Bỏ qua nếu không ghi được file
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const activeProvider = this.ai.getActiveProvider();
|
|
258
|
+
const info = {
|
|
259
|
+
project: this.projectPath,
|
|
260
|
+
provider: activeProvider,
|
|
261
|
+
model: this.ai.providers[activeProvider]?.model,
|
|
262
|
+
session: this.session.getSessionId().substring(0, 8)
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
// Show banner only if not already shown
|
|
266
|
+
if (!process.env.WINTER_BANNER_SHOWN) {
|
|
267
|
+
console.log(welcomeBanner(this.version, info));
|
|
268
|
+
process.env.WINTER_BANNER_SHOWN = '1';
|
|
269
|
+
} else {
|
|
270
|
+
this.showStatus();
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Hiển thị lịch sử chat nếu đang load lại session cũ
|
|
274
|
+
const sessionHistory = this.session.getHistory(10); // Lấy tối đa 10 câu gần nhất cho đỡ rác màn hình
|
|
275
|
+
if (sessionHistory.length > 0) {
|
|
276
|
+
const columns = process.stdout.columns || 80;
|
|
277
|
+
const W = Math.max(60, Math.min(Math.floor(columns * 0.95), 100));
|
|
278
|
+
const titleStr = ' Lịch sử phiên làm việc ';
|
|
279
|
+
const sideLine = '─'.repeat(Math.max(0, Math.floor((W - titleStr.length) / 2)));
|
|
280
|
+
const bottomLine = '─'.repeat(W);
|
|
281
|
+
|
|
282
|
+
console.log(`\n${colors.dim}${sideLine}${titleStr}${sideLine}${colors.reset}`);
|
|
283
|
+
for (const msg of sessionHistory) {
|
|
284
|
+
if (msg.role === 'user') {
|
|
285
|
+
console.log(`\n${colors.cyan}Bạn:${colors.reset} ${msg.content}`);
|
|
286
|
+
} else if (msg.role === 'assistant') {
|
|
287
|
+
const formatted = formatMarkdown(msg.content);
|
|
288
|
+
console.log(`\n${colors.bright}${colors.magenta}Winter:${colors.reset}${formatted}`);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
console.log(`\n${colors.dim}${bottomLine}${colors.reset}\n`);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Setup readline
|
|
295
|
+
this.rl = readline.createInterface({
|
|
296
|
+
input: process.stdin,
|
|
297
|
+
output: process.stdout,
|
|
298
|
+
prompt: `${colors.bright}${colors.cyan}winter ❄ ${colors.reset} `,
|
|
299
|
+
completer: this.completer.bind(this),
|
|
300
|
+
});
|
|
301
|
+
this.installSlashSuggestions();
|
|
302
|
+
|
|
303
|
+
// Bắt sự kiện Ctrl+C để in ra lệnh tiếp tục session
|
|
304
|
+
this.rl.on('SIGINT', () => {
|
|
305
|
+
console.log(`\n\n${colors.cyan}❄ Cảm ơn bạn đã sử dụng Winter!${colors.reset}`);
|
|
306
|
+
console.log(`${colors.yellow}Để tiếp tục phiên làm việc này sau này, hãy chạy:${colors.reset}`);
|
|
307
|
+
console.log(`${colors.bright}${colors.green}winter --session ${this.session.getSessionId()}${colors.reset}\n`);
|
|
308
|
+
process.exit(0);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// Hiển thị prompt lần đầu tiên ngay khi khởi động xong
|
|
312
|
+
this.rl.prompt();
|
|
313
|
+
|
|
314
|
+
this.rl.on('line', (line) => {
|
|
315
|
+
this.inputQueue = this.inputQueue
|
|
316
|
+
.then(async () => {
|
|
317
|
+
const input = line.trim();
|
|
318
|
+
if (input) {
|
|
319
|
+
await this.handleInput(input);
|
|
320
|
+
} else {
|
|
321
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
322
|
+
}
|
|
323
|
+
})
|
|
324
|
+
.catch((error) => {
|
|
325
|
+
console.log(`\n${colors.red}✖ Error: ${error.message}${colors.reset}\n`);
|
|
326
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
this.rl.on('close', async () => {
|
|
331
|
+
this.readlineClosed = true;
|
|
332
|
+
await this.inputQueue.catch(() => { });
|
|
333
|
+
console.log(`\n${colors.dim}Goodbye.${colors.reset}\n`);
|
|
334
|
+
process.exit(0);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
showStatus() {
|
|
339
|
+
console.log(`${colors.dim}Project: ${this.projectPath}${colors.reset}`);
|
|
340
|
+
console.log(`${colors.dim}Provider: ${this.ai.getActiveProvider()}${colors.reset}`);
|
|
341
|
+
console.log(`${colors.dim}Session: ${this.session.getSessionId().substring(0, 8)}${colors.reset}`);
|
|
342
|
+
console.log('');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
getResourcePaths() {
|
|
346
|
+
const home = homedir();
|
|
347
|
+
const localRoot = path.join(this.projectPath, 'resources', 'local');
|
|
348
|
+
return {
|
|
349
|
+
codex: {
|
|
350
|
+
root: path.join(localRoot, 'codex'),
|
|
351
|
+
skills: path.join(localRoot, 'codex', 'skills'),
|
|
352
|
+
plugins: path.join(localRoot, 'codex', 'plugins'),
|
|
353
|
+
models: path.join(localRoot, 'codex', 'models_cache.json'),
|
|
354
|
+
rules: path.join(localRoot, 'codex', 'rules'),
|
|
355
|
+
memories: path.join(localRoot, 'codex', 'memories'),
|
|
356
|
+
},
|
|
357
|
+
claude: {
|
|
358
|
+
root: path.join(localRoot, 'claude'),
|
|
359
|
+
skills: path.join(localRoot, 'claude', 'skills'),
|
|
360
|
+
plugins: path.join(localRoot, 'claude', 'plugins'),
|
|
361
|
+
projects: path.join(localRoot, 'claude', 'projects'),
|
|
362
|
+
settings: path.join(localRoot, 'claude', 'settings.json'),
|
|
363
|
+
},
|
|
364
|
+
karpathy: path.join(localRoot, 'karpathy-tools'),
|
|
365
|
+
designs: path.join(localRoot, 'awesome-design-md', 'design-md'),
|
|
366
|
+
agents: path.join(localRoot, 'agents.md'),
|
|
367
|
+
manifest: path.join(localRoot, 'manifest.json'),
|
|
368
|
+
localRoot,
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
async showResourceManifest() {
|
|
373
|
+
try {
|
|
374
|
+
const raw = await fs.readFile(this.getResourcePaths().manifest, 'utf8');
|
|
375
|
+
const manifest = JSON.parse(raw.replace(/^\uFEFF/, ''));
|
|
376
|
+
console.log(`${colors.cyan}Local resources:${colors.reset} ${manifest.root || this.getResourcePaths().localRoot}`);
|
|
377
|
+
for (const item of manifest.localResources || []) {
|
|
378
|
+
const sizeMb = item.bytes ? `${(item.bytes / 1024 / 1024).toFixed(2)} MB` : 'n/a';
|
|
379
|
+
console.log(` ${item.name}: ${item.files} file(s), ${sizeMb}`);
|
|
380
|
+
}
|
|
381
|
+
if (manifest.excludedForSafety?.length) {
|
|
382
|
+
console.log(`${colors.dim}Excluded: secrets, sessions, logs, runtime cache, and very large plugin/project caches.${colors.reset}`);
|
|
383
|
+
}
|
|
384
|
+
if (manifest.redacted?.length) {
|
|
385
|
+
console.log(`${colors.dim}Redacted: ${manifest.redacted.join('; ')}${colors.reset}`);
|
|
386
|
+
}
|
|
387
|
+
} catch (error) {
|
|
388
|
+
console.log(`${colors.red}Cannot read local resource manifest: ${error.message}${colors.reset}`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
async showResourceGroup(group, section) {
|
|
393
|
+
const paths = this.getResourcePaths()[group];
|
|
394
|
+
if (!paths) return;
|
|
395
|
+
|
|
396
|
+
const target = section && paths[section] ? paths[section] : paths.root;
|
|
397
|
+
await this.printPathPreview(target, `${group}${section ? `/${section}` : ''}`);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
async showKarpathyResources() {
|
|
401
|
+
await this.printPathPreview(this.getResourcePaths().karpathy, 'karpathy-tools');
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
async showAgentsFile() {
|
|
405
|
+
await this.printPathPreview(this.getResourcePaths().agents, 'agents.md');
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
async showDesignSystems(query = '') {
|
|
409
|
+
const entries = await this.listPathEntries(this.getResourcePaths().designs, 200);
|
|
410
|
+
const filtered = query
|
|
411
|
+
? entries.filter(entry => entry.name.toLowerCase().includes(query.toLowerCase()))
|
|
412
|
+
: entries;
|
|
413
|
+
|
|
414
|
+
console.log(`${colors.cyan}Design systems (${filtered.length}):${colors.reset}`);
|
|
415
|
+
filtered.slice(0, 80).forEach(entry => console.log(` ${entry.name}`));
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
async showAllLocalSkills() {
|
|
419
|
+
const paths = this.getResourcePaths();
|
|
420
|
+
const groups = [
|
|
421
|
+
['winter', path.join(homedir(), '.winter', 'skills')],
|
|
422
|
+
['codex', paths.codex.skills],
|
|
423
|
+
['claude', paths.claude.skills],
|
|
424
|
+
];
|
|
425
|
+
|
|
426
|
+
for (const [name, target] of groups) {
|
|
427
|
+
const entries = await this.listPathEntries(target, 80);
|
|
428
|
+
console.log(`${colors.cyan}${name} skills (${entries.length}):${colors.reset}`);
|
|
429
|
+
entries.slice(0, 40).forEach(entry => console.log(` ${entry.name}`));
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
async showModels() {
|
|
434
|
+
const cfg = await this.config.load();
|
|
435
|
+
console.log(`${colors.cyan}Configured models:${colors.reset}`);
|
|
436
|
+
for (const [name, value] of Object.entries(cfg)) {
|
|
437
|
+
if (value && typeof value === 'object' && value.model) {
|
|
438
|
+
const active = name === cfg.defaultProvider ? '*' : ' ';
|
|
439
|
+
console.log(` ${active} ${name}: ${value.model}`);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
try {
|
|
444
|
+
const raw = await fs.readFile(this.getResourcePaths().codex.models, 'utf8');
|
|
445
|
+
const unique = this.extractModelIdsFromCache(raw).slice(0, 30);
|
|
446
|
+
if (unique.length) {
|
|
447
|
+
console.log(`${colors.cyan}Codex cached models:${colors.reset}`);
|
|
448
|
+
unique.forEach(model => console.log(` ${model}`));
|
|
449
|
+
}
|
|
450
|
+
} catch { }
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
extractModelIdsFromCache(raw) {
|
|
454
|
+
try {
|
|
455
|
+
const data = JSON.parse(String(raw || '').replace(/^\uFEFF/, ''));
|
|
456
|
+
const models = Array.isArray(data.models) ? data.models : [];
|
|
457
|
+
return [...new Set(models
|
|
458
|
+
.map(model => model.slug || model.id || model.name)
|
|
459
|
+
.filter(value => typeof value === 'string' && value.trim())
|
|
460
|
+
)];
|
|
461
|
+
} catch {
|
|
462
|
+
return [];
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
async printPathPreview(target, label) {
|
|
467
|
+
try {
|
|
468
|
+
const stat = await fs.stat(target);
|
|
469
|
+
console.log(`${colors.cyan}${label}:${colors.reset} ${target}`);
|
|
470
|
+
if (stat.isDirectory()) {
|
|
471
|
+
const entries = await this.listPathEntries(target, 80);
|
|
472
|
+
entries.slice(0, 40).forEach(entry => {
|
|
473
|
+
console.log(` ${entry.isDirectory ? '[dir] ' : '[file]'} ${entry.name}`);
|
|
474
|
+
});
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const content = await fs.readFile(target, 'utf8');
|
|
479
|
+
console.log(content.split(/\r?\n/).slice(0, 80).join('\n'));
|
|
480
|
+
} catch (error) {
|
|
481
|
+
console.log(`${colors.red}Cannot read ${label}: ${error.message}${colors.reset}`);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
async listPathEntries(target, limit = 100) {
|
|
486
|
+
try {
|
|
487
|
+
const entries = await fs.readdir(target, { withFileTypes: true });
|
|
488
|
+
return entries
|
|
489
|
+
.map(entry => ({ name: entry.name, isDirectory: entry.isDirectory() }))
|
|
490
|
+
.sort((a, b) => Number(b.isDirectory) - Number(a.isDirectory) || a.name.localeCompare(b.name))
|
|
491
|
+
.slice(0, limit);
|
|
492
|
+
} catch {
|
|
493
|
+
return [];
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
async handleInput(input) {
|
|
498
|
+
if (this.isProcessing) {
|
|
499
|
+
const pos = this.taskQueue.length + 1;
|
|
500
|
+
console.log(`${colors.magenta}◎${colors.reset} ${colors.dim}Đã xếp hàng chờ (vị trí #${pos})${colors.reset}`);
|
|
501
|
+
this.taskQueue.push(input);
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
await this.processInputTask(input);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
async processInputTask(input) {
|
|
508
|
+
this.isProcessing = true;
|
|
509
|
+
this.isCancelled = false;
|
|
510
|
+
try {
|
|
511
|
+
this.history.push(input);
|
|
512
|
+
if (this.history.length > this.maxHistory) {
|
|
513
|
+
this.history = this.history.slice(-this.maxHistory);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
if (input.startsWith('/')) {
|
|
517
|
+
await this.handleSlashCommand(input);
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const imageMatch = input.match(/(\S+\.(?:png|jpg|jpeg|gif|webp|bmp|svg))/i);
|
|
522
|
+
let handled = false;
|
|
523
|
+
if (imageMatch) {
|
|
524
|
+
const imgPath = path.resolve(this.projectPath, imageMatch[1]);
|
|
525
|
+
try {
|
|
526
|
+
const img = await this.loadImageAsBase64(imgPath);
|
|
527
|
+
if (img) {
|
|
528
|
+
await this.chat(input, [img]);
|
|
529
|
+
handled = true;
|
|
530
|
+
}
|
|
531
|
+
} catch { }
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if (!handled) {
|
|
535
|
+
await this.chat(input);
|
|
536
|
+
}
|
|
537
|
+
} catch (error) {
|
|
538
|
+
if (error.message === 'AbortError') {
|
|
539
|
+
console.log(colors.red + '\nĐã hủy công việc hiện tại.' + colors.reset);
|
|
540
|
+
} else {
|
|
541
|
+
console.log(colors.red + '\nLỗi: ' + error.message + colors.reset);
|
|
542
|
+
}
|
|
543
|
+
} finally {
|
|
544
|
+
this.isProcessing = false;
|
|
545
|
+
this.isCancelled = false;
|
|
546
|
+
if (this.spinner) this.spinner.stop();
|
|
547
|
+
|
|
548
|
+
if (this.taskQueue.length > 0) {
|
|
549
|
+
const nextTask = this.taskQueue.shift();
|
|
550
|
+
setTimeout(() => this.processInputTask(nextTask), 0);
|
|
551
|
+
} else {
|
|
552
|
+
if (!this.readlineClosed) this.rl.prompt(true);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
async loadImageAsBase64(filePath) {
|
|
558
|
+
try {
|
|
559
|
+
const fs = await import('fs/promises');
|
|
560
|
+
const ext = path.extname(filePath).toLowerCase().substring(1);
|
|
561
|
+
const mime = {
|
|
562
|
+
png: 'image/png',
|
|
563
|
+
jpg: 'image/jpeg',
|
|
564
|
+
jpeg: 'image/jpeg',
|
|
565
|
+
gif: 'image/gif',
|
|
566
|
+
webp: 'image/webp',
|
|
567
|
+
svg: 'image/svg+xml'
|
|
568
|
+
}[ext] || 'image/jpeg';
|
|
569
|
+
|
|
570
|
+
const buffer = await fs.readFile(filePath);
|
|
571
|
+
return { mime, base64: buffer.toString('base64') };
|
|
572
|
+
} catch {
|
|
573
|
+
return null;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
async showInteractiveChecklist(title, items) {
|
|
578
|
+
if (!items || items.length === 0) return [];
|
|
579
|
+
|
|
580
|
+
return new Promise((resolve) => {
|
|
581
|
+
let cursor = 0;
|
|
582
|
+
const selected = new Set(items.map((_, i) => i)); // default select all
|
|
583
|
+
|
|
584
|
+
let printedLines = 0;
|
|
585
|
+
const render = () => {
|
|
586
|
+
// Xóa những dòng đã in trước đó
|
|
587
|
+
if (printedLines > 0) {
|
|
588
|
+
process.stdout.write('\x1b[' + printedLines + 'A\x1b[J');
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
let out = `\n[36m${title}[0m\n`;
|
|
592
|
+
out += `[2mDùng mũi tên (↑/↓) để di chuyển, [Space] để chọn/bỏ chọn, [Enter] để xác nhận[0m\n\n`;
|
|
593
|
+
|
|
594
|
+
for (let i = 0; i < items.length; i++) {
|
|
595
|
+
const isHover = i === cursor;
|
|
596
|
+
const isSelected = selected.has(i);
|
|
597
|
+
const prefix = isHover ? `[36m>[0m` : ' ';
|
|
598
|
+
const box = isSelected ? `[32m[x][0m` : '[ ]';
|
|
599
|
+
out += ` ${prefix} ${box} ${items[i]}\n`;
|
|
600
|
+
}
|
|
601
|
+
process.stdout.write(out);
|
|
602
|
+
printedLines = items.length + 4; // count lines outputted
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
const onKeyPress = (str, key) => {
|
|
606
|
+
if (key.name === 'up' && cursor > 0) cursor--;
|
|
607
|
+
else if (key.name === 'down' && cursor < items.length - 1) cursor++;
|
|
608
|
+
else if (key.name === 'space') {
|
|
609
|
+
if (selected.has(cursor)) selected.delete(cursor);
|
|
610
|
+
else selected.add(cursor);
|
|
611
|
+
} else if (key.name === 'return') {
|
|
612
|
+
cleanup();
|
|
613
|
+
const result = items.filter((_, i) => selected.has(i));
|
|
614
|
+
resolve(result);
|
|
615
|
+
return;
|
|
616
|
+
} else if (key.ctrl && key.name === 'c') {
|
|
617
|
+
cleanup();
|
|
618
|
+
resolve([]);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
render();
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
const cleanup = () => {
|
|
625
|
+
process.stdin.removeListener('keypress', onKeyPress);
|
|
626
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(false);
|
|
627
|
+
this.rl.resume();
|
|
628
|
+
process.stdout.write('\n');
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
this.rl.pause();
|
|
632
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
633
|
+
|
|
634
|
+
readline.emitKeypressEvents(process.stdin);
|
|
635
|
+
process.stdin.on('keypress', onKeyPress);
|
|
636
|
+
|
|
637
|
+
render();
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
async generateInteractivePlan(task) {
|
|
642
|
+
this.spinner = new Spinner('Đang phân tích và chia nhỏ yêu cầu...');
|
|
643
|
+
this.spinner.start();
|
|
644
|
+
|
|
645
|
+
const messages = [
|
|
646
|
+
{ role: 'system', content: 'Bạn là chuyên gia lập kế hoạch. Hãy chia nhỏ yêu cầu của người dùng thành các bước cụ thể, hành động được, rất ngắn gọn (dưới 15 chữ mỗi bước). CHỈ TRẢ VỀ MỘT MẢNG JSON CÁC CHUỖI, KHÔNG GIẢI THÍCH GÌ THÊM. Ví dụ: ["Tạo file index.html", "Thêm CSS styling", "Viết script.js"]' },
|
|
647
|
+
{ role: 'user', content: task }
|
|
648
|
+
];
|
|
649
|
+
|
|
650
|
+
try {
|
|
651
|
+
const response = await this.ai.sendRequest(messages, {
|
|
652
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model
|
|
653
|
+
});
|
|
654
|
+
if (this.spinner) this.spinner.stop();
|
|
655
|
+
|
|
656
|
+
const text = response.choices?.[0]?.message?.content || '[]';
|
|
657
|
+
let items = [];
|
|
658
|
+
try {
|
|
659
|
+
const jsonMatch = text.match(/\[([\s\S]*?)\]/);
|
|
660
|
+
if (jsonMatch) {
|
|
661
|
+
items = JSON.parse(jsonMatch[0]);
|
|
662
|
+
}
|
|
663
|
+
} catch (e) {
|
|
664
|
+
// Fallback fallback fallback
|
|
665
|
+
items = text.split('\n').filter(l => l.trim().length > 0).map(l => l.replace(/^- \[.*?\]|- |\d+\./, '').trim());
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
if (!Array.isArray(items) || items.length === 0) {
|
|
669
|
+
console.log(`\x1b[33mKhông thể parse kế hoạch. AI phản hồi: ${text}\x1b[0m`);
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
const selectedSteps = await this.showInteractiveChecklist('KẾ HOẠCH THỰC HIỆN:', items);
|
|
674
|
+
|
|
675
|
+
if (selectedSteps.length > 0) {
|
|
676
|
+
for (const step of selectedSteps) {
|
|
677
|
+
await this.session.createPlan(step, task);
|
|
678
|
+
}
|
|
679
|
+
console.log(`\x1b[32m✓ Đã thêm ${selectedSteps.length} công việc vào Memory (gõ /plans để xem).\x1b[0m`);
|
|
680
|
+
|
|
681
|
+
this.rl.question(`\n\x1b[36mBạn có muốn AI bắt tay làm công việc ĐẦU TIÊN ngay bây giờ không? [y/N]: \x1b[0m`, async (answer) => {
|
|
682
|
+
if (answer.toLowerCase() === 'y') {
|
|
683
|
+
await this.chat(`Hãy bắt đầu thực hiện bước đầu tiên: ${selectedSteps[0]}`);
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
} else {
|
|
687
|
+
console.log(`\n\x1b[2mĐã huỷ kế hoạch.\x1b[0m`);
|
|
688
|
+
}
|
|
689
|
+
} catch (e) {
|
|
690
|
+
if (this.spinner) this.spinner.stop();
|
|
691
|
+
console.log(`\x1b[31mLỗi: ${e.message}\x1b[0m`);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
async runAutoHealing(task) {
|
|
697
|
+
console.log(`\n\x1b[35m[ TDD AUTO-HEALING MODE ]\x1b[0m Kích hoạt vòng lặp chữa lành lỗi tự động.`);
|
|
698
|
+
|
|
699
|
+
// Tăng giới hạn loop lên 15 để cho phép AI tự sửa lỗi nhiều lần
|
|
700
|
+
const originalRequestAssistantTurn = this.requestAssistantTurn;
|
|
701
|
+
|
|
702
|
+
// Chèn prompt đặc biệt ép AI phải verify
|
|
703
|
+
const autoPrompt = `TASK: ${task}
|
|
704
|
+
|
|
705
|
+
CRITICAL TDD RULES:
|
|
706
|
+
1. Write code to solve the task.
|
|
707
|
+
2. IMMEDIATELY use the Bash tool to run the code (e.g., 'node file.js', 'npm run build', or 'tsc').
|
|
708
|
+
3. If the Bash tool returns ANY errors, read the error, Edit the code to fix it, and RUN IT AGAIN.
|
|
709
|
+
4. DO NOT STOP AND DO NOT ASK FOR PERMISSION. KEEP FIXING AND RUNNING UNTIL THERE ARE NO ERRORS.
|
|
710
|
+
5. Only return your final answer when the bash execution shows SUCCESS.`;
|
|
711
|
+
|
|
712
|
+
await this.chat(autoPrompt);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
async runAutoCommit(context = '') {
|
|
716
|
+
console.log(`\n${colors.cyan}❄ Tạo commit message tự động...${colors.reset}`);
|
|
717
|
+
const diffResult = await this.tools.execute('Bash', { command: 'git diff --cached' }, { cwd: this.projectPath });
|
|
718
|
+
|
|
719
|
+
let diff = diffResult.stdout;
|
|
720
|
+
let isStaged = true;
|
|
721
|
+
if (!diff || diff.trim() === '') {
|
|
722
|
+
const allDiff = await this.tools.execute('Bash', { command: 'git diff' }, { cwd: this.projectPath });
|
|
723
|
+
diff = allDiff.stdout;
|
|
724
|
+
isStaged = false;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
if (!diff || diff.trim() === '') {
|
|
728
|
+
console.log(`${colors.yellow}⚠ Không có thay đổi nào để commit.${colors.reset}`);
|
|
729
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const prompt = `Bạn là chuyên gia Git. Hãy viết MỘT commit message duy nhất (không giải thích thêm) cho những thay đổi sau đây. Dùng format chuẩn Conventional Commits (feat/fix/chore/refactor: ...). ${context ? `\nNgữ cảnh: ${context}` : ''}\n\nDiff:\n${diff.slice(0, 6000)}`;
|
|
734
|
+
|
|
735
|
+
this.spinner = new Spinner('Đang sinh commit message...');
|
|
736
|
+
this.spinner.start();
|
|
737
|
+
try {
|
|
738
|
+
const response = await this.ai.sendRequest([{ role: 'user', content: prompt }], {
|
|
739
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model
|
|
740
|
+
});
|
|
741
|
+
if (this.spinner) this.spinner.stop();
|
|
742
|
+
|
|
743
|
+
const message = response.choices?.[0]?.message?.content?.trim().replace(/^["']|["']$/g, '') || 'Cập nhật mã nguồn';
|
|
744
|
+
|
|
745
|
+
console.log(`\n${colors.green}Đề xuất commit message:${colors.reset}`);
|
|
746
|
+
console.log(`${colors.bright}${message}${colors.reset}\n`);
|
|
747
|
+
|
|
748
|
+
this.rl.question(`${colors.yellow}Bạn có muốn commit với message này không? [y/N/e (tự sửa)]: ${colors.reset}`, async (ans) => {
|
|
749
|
+
const choice = ans.trim().toLowerCase();
|
|
750
|
+
if (choice === 'y') {
|
|
751
|
+
if (!isStaged) await this.tools.execute('Bash', { command: 'git add .' }, { cwd: this.projectPath });
|
|
752
|
+
const res = await this.tools.execute('Bash', { command: `git commit -m "${message.replace(/"/g, '\\"')}"` }, { cwd: this.projectPath });
|
|
753
|
+
console.log(res.stdout);
|
|
754
|
+
} else if (choice === 'e') {
|
|
755
|
+
this.rl.question(`${colors.cyan}Nhập commit message: ${colors.reset}`, async (customMsg) => {
|
|
756
|
+
if (customMsg.trim()) {
|
|
757
|
+
if (!isStaged) await this.tools.execute('Bash', { command: 'git add .' }, { cwd: this.projectPath });
|
|
758
|
+
const res = await this.tools.execute('Bash', { command: `git commit -m "${customMsg.replace(/"/g, '\\"')}"` }, { cwd: this.projectPath });
|
|
759
|
+
console.log(res.stdout);
|
|
760
|
+
}
|
|
761
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
762
|
+
});
|
|
763
|
+
return;
|
|
764
|
+
} else {
|
|
765
|
+
console.log(`${colors.dim}Đã huỷ commit.${colors.reset}`);
|
|
766
|
+
}
|
|
767
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
768
|
+
});
|
|
769
|
+
} catch (e) {
|
|
770
|
+
if (this.spinner) this.spinner.stop();
|
|
771
|
+
console.log(`${colors.red}Lỗi: ${e.message}${colors.reset}`);
|
|
772
|
+
if (this.running && !this.readlineClosed) this.rl.prompt();
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
async runCodeReview(context = '') {
|
|
777
|
+
console.log(`\n${colors.cyan}❄ AI đang soi code của bạn...${colors.reset}`);
|
|
778
|
+
const diffResult = await this.tools.execute('Bash', { command: 'git diff HEAD' }, { cwd: this.projectPath });
|
|
779
|
+
const diff = diffResult.stdout;
|
|
780
|
+
|
|
781
|
+
if (!diff || diff.trim() === '') {
|
|
782
|
+
console.log(`${colors.yellow}⚠ Không có thay đổi nào để review.${colors.reset}`);
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
const prompt = `Hãy đóng vai một Senior Developer khó tính. Review nhanh các thay đổi sau đây. Chỉ ra bug (nếu có), vấn đề bảo mật, hoặc những chỗ cần clean code. Không cần khen ngợi, hãy nói thẳng vào vấn đề. Trình bày dạng Markdown đẹp mắt. \n\n${context ? `Ngữ cảnh: ${context}\n` : ''}Diff:\n${diff.slice(0, 8000)}`;
|
|
787
|
+
|
|
788
|
+
await this.chat(prompt);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
async handleSlashCommand(input) {
|
|
792
|
+
const parts = input.split(/\s+/);
|
|
793
|
+
const cmd = parts[0].toLowerCase();
|
|
794
|
+
const args = parts.slice(1);
|
|
795
|
+
|
|
796
|
+
switch (cmd) {
|
|
797
|
+
// Project commands
|
|
798
|
+
case '/project':
|
|
799
|
+
case '/pwd':
|
|
800
|
+
console.log(`${colors.cyan}${this.projectPath}${colors.reset}`);
|
|
801
|
+
break;
|
|
802
|
+
case '/cd':
|
|
803
|
+
if (args[0]) {
|
|
804
|
+
this.projectPath = path.resolve(args[0]);
|
|
805
|
+
console.log(`${colors.green}✓ Changed to: ${this.projectPath}${colors.reset}`);
|
|
806
|
+
}
|
|
807
|
+
break;
|
|
808
|
+
|
|
809
|
+
// Session commands
|
|
810
|
+
case '/session':
|
|
811
|
+
console.log(`${colors.cyan}Session: ${this.session.getSessionId().substring(0, 8)}${colors.reset}`);
|
|
812
|
+
break;
|
|
813
|
+
case '/sessions':
|
|
814
|
+
const sessions = await this.session.listSessions();
|
|
815
|
+
console.log(`${colors.cyan}Sessions:${colors.reset}`);
|
|
816
|
+
sessions.forEach(s => console.log(` ${s.id.substring(0, 8)} - ${s.createdAt}`));
|
|
817
|
+
break;
|
|
818
|
+
case '/clear':
|
|
819
|
+
console.clear();
|
|
820
|
+
break;
|
|
821
|
+
|
|
822
|
+
// Memory commands
|
|
823
|
+
case '/remember':
|
|
824
|
+
if (args.length > 0) {
|
|
825
|
+
await this.session.addToMemory(args.join(' '));
|
|
826
|
+
console.log(`${colors.green}✓ Remembered${colors.reset}`);
|
|
827
|
+
}
|
|
828
|
+
break;
|
|
829
|
+
case '/memories':
|
|
830
|
+
const memories = this.session.getMemory();
|
|
831
|
+
if (memories.length === 0) {
|
|
832
|
+
console.log(`${colors.dim}No memories${colors.reset}`);
|
|
833
|
+
} else {
|
|
834
|
+
console.log(`${colors.cyan}Memories:${colors.reset}`);
|
|
835
|
+
memories.slice(-10).forEach(m => console.log(` ${colors.dim}•${colors.reset} ${m.text}`));
|
|
836
|
+
}
|
|
837
|
+
break;
|
|
838
|
+
case '/forget':
|
|
839
|
+
console.log(`${colors.green}✓ Memories cleared${colors.reset}`);
|
|
840
|
+
break;
|
|
841
|
+
|
|
842
|
+
// Git Auto-Pilot
|
|
843
|
+
case '/commit':
|
|
844
|
+
await this.runAutoCommit(args.join(' '));
|
|
845
|
+
return;
|
|
846
|
+
case '/review':
|
|
847
|
+
await this.runCodeReview(args.join(' '));
|
|
848
|
+
return;
|
|
849
|
+
|
|
850
|
+
// Plan commands
|
|
851
|
+
case '/plan':
|
|
852
|
+
case '/plans':
|
|
853
|
+
if (args.length > 0) {
|
|
854
|
+
await this.generateInteractivePlan(args.join(' '));
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
const plans = this.session.getPlans();
|
|
858
|
+
if (plans.length === 0) {
|
|
859
|
+
console.log(`${colors.dim}No active plans${colors.reset}`);
|
|
860
|
+
} else {
|
|
861
|
+
console.log(`${colors.cyan}Active Plans:${colors.reset}`);
|
|
862
|
+
plans.forEach(p => console.log(` ${colors.green}•${colors.reset} ${p.title} [${p.status}]`));
|
|
863
|
+
}
|
|
864
|
+
break;
|
|
865
|
+
|
|
866
|
+
// Task commands
|
|
867
|
+
case '/tasks':
|
|
868
|
+
const tasks = this.session.getPlans();
|
|
869
|
+
if (tasks.length === 0) {
|
|
870
|
+
console.log(`${colors.dim}No tasks${colors.reset}`);
|
|
871
|
+
} else {
|
|
872
|
+
console.log(`${colors.cyan}Tasks:${colors.reset}`);
|
|
873
|
+
tasks.forEach(t => console.log(` ${colors.green}•${colors.reset} ${t.title} [${t.status}]`));
|
|
874
|
+
}
|
|
875
|
+
break;
|
|
876
|
+
case '/task':
|
|
877
|
+
if (args.length > 0) {
|
|
878
|
+
await this.session.createPlan(args.join(' '), '');
|
|
879
|
+
console.log(`${colors.green}✓ Task created${colors.reset}`);
|
|
880
|
+
}
|
|
881
|
+
break;
|
|
882
|
+
case '/agent':
|
|
883
|
+
if (args.length > 0) {
|
|
884
|
+
let role = 'general';
|
|
885
|
+
let task = args.join(' ');
|
|
886
|
+
const first = args[0].toLowerCase();
|
|
887
|
+
if (['plan', 'review', 'debug', 'research', 'browser'].includes(first)) {
|
|
888
|
+
role = first;
|
|
889
|
+
task = args.slice(1).join(' ');
|
|
890
|
+
}
|
|
891
|
+
if (!task) {
|
|
892
|
+
console.log(`${colors.dim}Usage: /agent [plan|review|debug|research|browser] <task>${colors.reset}`);
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
console.log(`${colors.cyan}Subagent:${colors.reset} ${role}`);
|
|
896
|
+
await this.runAgent(role, task);
|
|
897
|
+
} else {
|
|
898
|
+
console.log(`${colors.dim}Usage: /agent [plan|review|debug|research|browser] <task>${colors.reset}`);
|
|
899
|
+
}
|
|
900
|
+
break;
|
|
901
|
+
|
|
902
|
+
// Tool commands
|
|
903
|
+
case '/read':
|
|
904
|
+
if (args[0]) {
|
|
905
|
+
const result = await this.tools.execute('Read', { file_path: path.resolve(this.projectPath, args[0]) });
|
|
906
|
+
if (result.success) {
|
|
907
|
+
console.log(result.content);
|
|
908
|
+
} else {
|
|
909
|
+
console.log(`${colors.red}Error: ${result.error}${colors.reset}`);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
break;
|
|
913
|
+
case '/write':
|
|
914
|
+
if (args.length > 1) {
|
|
915
|
+
const [file, ...content] = args;
|
|
916
|
+
const result = await this.tools.execute('Write', { file_path: path.resolve(this.projectPath, file), content: content.join(' ') });
|
|
917
|
+
if (result.success) {
|
|
918
|
+
console.log(`${colors.green}✓ Wrote ${file}${colors.reset}`);
|
|
919
|
+
} else {
|
|
920
|
+
console.log(`${colors.red}Error: ${result.error}${colors.reset}`);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
break;
|
|
924
|
+
case '/bash':
|
|
925
|
+
if (args.length > 0) {
|
|
926
|
+
const result = await this.tools.execute('Bash', { command: args.join(' '), cwd: this.projectPath });
|
|
927
|
+
if (result.success) {
|
|
928
|
+
if (result.stdout) console.log(result.stdout);
|
|
929
|
+
if (result.stderr) console.log(`${colors.yellow}${result.stderr}${colors.reset}`);
|
|
930
|
+
} else {
|
|
931
|
+
console.log(`${colors.red}Error: ${result.error}${colors.reset}`);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
break;
|
|
935
|
+
case '/glob':
|
|
936
|
+
if (args[0]) {
|
|
937
|
+
const result = await this.tools.execute('Glob', { pattern: args[0], cwd: this.projectPath });
|
|
938
|
+
if (result.success) {
|
|
939
|
+
result.files.forEach(f => console.log(` ${f}`));
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
break;
|
|
943
|
+
case '/grep':
|
|
944
|
+
if (args[0]) {
|
|
945
|
+
const result = await this.tools.execute('Grep', { pattern: args[0], path: this.projectPath });
|
|
946
|
+
if (result.success) {
|
|
947
|
+
result.matches.forEach(m => console.log(` ${m}`));
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
break;
|
|
951
|
+
case '/image':
|
|
952
|
+
if (args.length > 0) {
|
|
953
|
+
const imgPath = path.resolve(this.projectPath, args[0]);
|
|
954
|
+
try {
|
|
955
|
+
const img = await this.loadImageAsBase64(imgPath);
|
|
956
|
+
if (img) {
|
|
957
|
+
const question = args.slice(1).join(' ') || 'Vui lòng phân tích hình ảnh này.';
|
|
958
|
+
await this.chat(question, [img]);
|
|
959
|
+
} else {
|
|
960
|
+
console.log(`[31mKhông thể load ảnh: ${args[0]}[0m`);
|
|
961
|
+
}
|
|
962
|
+
} catch {
|
|
963
|
+
console.log(`[31mLỗi xử lý ảnh[0m`);
|
|
964
|
+
}
|
|
965
|
+
} else {
|
|
966
|
+
console.log(`[2mSử dụng: /image <file> [câu hỏi][0m`);
|
|
967
|
+
}
|
|
968
|
+
break;
|
|
969
|
+
|
|
970
|
+
case '/paste':
|
|
971
|
+
const clipText = await this.getClipboardContent();
|
|
972
|
+
if (clipText) {
|
|
973
|
+
console.log(`\x1b[35m[CLIPBOARD]\x1b[0m Đã nhận ${clipText.length} ký tự từ bộ nhớ đệm.`);
|
|
974
|
+
const userQuery = args.join(' ') || 'Hãy đọc và phân tích nội dung sau:';
|
|
975
|
+
await this.chat(`${userQuery}\n\n\`\`\`\n${clipText}\n\`\`\``);
|
|
976
|
+
} else {
|
|
977
|
+
console.log('\x1b[33mKhông tìm thấy văn bản trong bộ nhớ đệm hoặc bị lỗi.\x1b[0m');
|
|
978
|
+
}
|
|
979
|
+
break;
|
|
980
|
+
|
|
981
|
+
// Design commands
|
|
982
|
+
case '/design':
|
|
983
|
+
const { DesignCommands } = await import('../design/commands.js');
|
|
984
|
+
const design = new DesignCommands(this.session, this.config);
|
|
985
|
+
await design.execute(args[0], args.slice(1));
|
|
986
|
+
break;
|
|
987
|
+
case '/designs':
|
|
988
|
+
await this.showDesignSystems(args[0]);
|
|
989
|
+
break;
|
|
990
|
+
|
|
991
|
+
// Skills commands
|
|
992
|
+
case '/skill':
|
|
993
|
+
const { SkillManager } = await import('../skills/manager.js');
|
|
994
|
+
const skills = new SkillManager(this.session);
|
|
995
|
+
const skillList = await skills.listSkills();
|
|
996
|
+
if (args[0] === 'list' || !args[0]) {
|
|
997
|
+
console.log(`${colors.cyan}Skills:${colors.reset}`);
|
|
998
|
+
skillList.forEach(s => console.log(` ${s.icon} ${s.name} - ${s.description}`));
|
|
999
|
+
}
|
|
1000
|
+
break;
|
|
1001
|
+
case '/skills':
|
|
1002
|
+
await this.showAllLocalSkills();
|
|
1003
|
+
break;
|
|
1004
|
+
|
|
1005
|
+
// Plugin commands
|
|
1006
|
+
case '/plugin':
|
|
1007
|
+
const { PluginManager } = await import('../plugins/manager.js');
|
|
1008
|
+
const plugins = new PluginManager(this.session);
|
|
1009
|
+
const pluginList = await plugins.listPlugins();
|
|
1010
|
+
if (args[0] === 'list' || !args[0]) {
|
|
1011
|
+
console.log(`${colors.cyan}Plugins:${colors.reset}`);
|
|
1012
|
+
pluginList.forEach(p => console.log(` ${p.icon} ${p.name} v${p.version}`));
|
|
1013
|
+
}
|
|
1014
|
+
break;
|
|
1015
|
+
case '/codex':
|
|
1016
|
+
await this.showResourceGroup('codex', args[0]);
|
|
1017
|
+
break;
|
|
1018
|
+
case '/claude':
|
|
1019
|
+
await this.showResourceGroup('claude', args[0]);
|
|
1020
|
+
break;
|
|
1021
|
+
case '/karpathy':
|
|
1022
|
+
await this.showKarpathyResources();
|
|
1023
|
+
break;
|
|
1024
|
+
case '/agents':
|
|
1025
|
+
await this.showAgentsFile();
|
|
1026
|
+
break;
|
|
1027
|
+
case '/resources':
|
|
1028
|
+
await this.showResourceManifest();
|
|
1029
|
+
break;
|
|
1030
|
+
|
|
1031
|
+
// Provider commands
|
|
1032
|
+
case '/provider':
|
|
1033
|
+
if (args[0]) {
|
|
1034
|
+
const providerName = args[0];
|
|
1035
|
+
if (this.ai.setProvider(providerName)) {
|
|
1036
|
+
await this.config.setDefaultProvider(providerName);
|
|
1037
|
+
console.log(`${colors.green}✓ Provider: ${providerName}${colors.reset}`);
|
|
1038
|
+
} else {
|
|
1039
|
+
console.log(`${colors.red}Unknown provider: ${providerName}${colors.reset}`);
|
|
1040
|
+
}
|
|
1041
|
+
} else {
|
|
1042
|
+
console.log(`${colors.cyan}Provider: ${this.ai.getActiveProvider()}${colors.reset}`);
|
|
1043
|
+
}
|
|
1044
|
+
break;
|
|
1045
|
+
case '/providers':
|
|
1046
|
+
const providers = this.ai.listProviders();
|
|
1047
|
+
console.log(`${colors.cyan}Providers:${colors.reset}`);
|
|
1048
|
+
providers.forEach(p => {
|
|
1049
|
+
const status = p.ready ? `${colors.green}●${colors.reset}` : `${colors.red}○${colors.reset}`;
|
|
1050
|
+
console.log(` ${status} ${p.name} (${p.model})`);
|
|
1051
|
+
});
|
|
1052
|
+
break;
|
|
1053
|
+
case '/models':
|
|
1054
|
+
await this.showModels();
|
|
1055
|
+
break;
|
|
1056
|
+
|
|
1057
|
+
// Config commands
|
|
1058
|
+
case '/config':
|
|
1059
|
+
const cfg = await this.config.load();
|
|
1060
|
+
console.log(JSON.stringify(cfg, null, 2));
|
|
1061
|
+
break;
|
|
1062
|
+
case '/model':
|
|
1063
|
+
if (args[0]) {
|
|
1064
|
+
const providerName = this.ai.getActiveProvider();
|
|
1065
|
+
const model = args.join(' ');
|
|
1066
|
+
await this.config.setProviderModel(providerName, model);
|
|
1067
|
+
this.ai.providers[providerName].model = model;
|
|
1068
|
+
console.log(`${colors.green}✓ Model for ${providerName}: ${model}${colors.reset}`);
|
|
1069
|
+
} else {
|
|
1070
|
+
console.log(`${colors.cyan}Model: ${this.ai.providers[this.ai.getActiveProvider()]?.model}${colors.reset}`);
|
|
1071
|
+
}
|
|
1072
|
+
break;
|
|
1073
|
+
|
|
1074
|
+
// Help & Exit
|
|
1075
|
+
case '/':
|
|
1076
|
+
this.showCommandMenu();
|
|
1077
|
+
break;
|
|
1078
|
+
case '/auto':
|
|
1079
|
+
case '/tdd':
|
|
1080
|
+
if (args.length > 0) {
|
|
1081
|
+
await this.runAutoHealing(args.join(' '));
|
|
1082
|
+
} else {
|
|
1083
|
+
console.log(`\x1b[33mSử dụng: /auto <yêu cầu code>\x1b[0m`);
|
|
1084
|
+
}
|
|
1085
|
+
break;
|
|
1086
|
+
case '/help':
|
|
1087
|
+
case '/?':
|
|
1088
|
+
this.showCommandMenu();
|
|
1089
|
+
break;
|
|
1090
|
+
case '/exit':
|
|
1091
|
+
case '/quit':
|
|
1092
|
+
this.running = false;
|
|
1093
|
+
console.log(`${colors.dim}Exiting...${colors.reset}`);
|
|
1094
|
+
if (!this.readlineClosed) this.rl.close();
|
|
1095
|
+
break;
|
|
1096
|
+
|
|
1097
|
+
default:
|
|
1098
|
+
// Try partial match
|
|
1099
|
+
const match = SLASH_COMMANDS.find(c => c.cmd.startsWith(cmd));
|
|
1100
|
+
if (match) {
|
|
1101
|
+
console.log(`${colors.cyan}${match.cmd}${colors.reset} - ${match.desc}`);
|
|
1102
|
+
if (match.usage) console.log(`${colors.dim}Usage: ${match.usage}${colors.reset}`);
|
|
1103
|
+
} else {
|
|
1104
|
+
console.log(`${colors.red}Unknown command: ${cmd}${colors.reset}`);
|
|
1105
|
+
console.log(`${colors.dim}Type /help for available commands${colors.reset}`);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
showCommandMenu() {
|
|
1111
|
+
const c = colors;
|
|
1112
|
+
const W = 78;
|
|
1113
|
+
const line = '─'.repeat(W - 2);
|
|
1114
|
+
const dline = '═'.repeat(W - 2);
|
|
1115
|
+
const row = (l, r) => {
|
|
1116
|
+
const ll = l.replace(/\x1b\[[0-9;]*m/g, '');
|
|
1117
|
+
const rl = r.replace(/\x1b\[[0-9;]*m/g, '');
|
|
1118
|
+
const pad = W - 4 - ll.length - rl.length;
|
|
1119
|
+
return `${c.magenta}│${c.reset} ${l}${' '.repeat(Math.max(1, pad))}${r} ${c.magenta}│${c.reset}`;
|
|
1120
|
+
};
|
|
1121
|
+
const header = (text) => {
|
|
1122
|
+
const tl = text.replace(/\x1b\[[0-9;]*m/g, '').length;
|
|
1123
|
+
const pad = W - 4 - tl;
|
|
1124
|
+
return `${c.magenta}│${c.reset} ${text}${' '.repeat(Math.max(0, pad))} ${c.magenta}│${c.reset}`;
|
|
1125
|
+
};
|
|
1126
|
+
const sep = `${c.magenta}├${line}┤${c.reset}`;
|
|
1127
|
+
console.log(`
|
|
1128
|
+
${c.magenta}╭${line}╮${c.reset}
|
|
1129
|
+
${header(`${c.bright}${c.cyan}❄ WINTER COMMANDS${c.reset}`)}
|
|
1130
|
+
${sep}
|
|
1131
|
+
${header(`${c.bright}Dự án & Phiên làm việc${c.reset}`)}
|
|
1132
|
+
${row(`${c.yellow}/pwd${c.reset} Thư mục hiện tại`, `${c.yellow}/session${c.reset} Phiên làm việc`)}
|
|
1133
|
+
${row(`${c.yellow}/cd${c.reset} Đổi thư mục`, `${c.yellow}/clear${c.reset} Xóa màn hình`)}
|
|
1134
|
+
${row(`${c.yellow}/config${c.reset} Xem cấu hình`, `${c.yellow}/exit${c.reset} Thoát`)}
|
|
1135
|
+
${sep}
|
|
1136
|
+
${header(`${c.bright}AI & Công cụ${c.reset}`)}
|
|
1137
|
+
${row(`${c.yellow}/auto${c.reset} TDD tự sửa lỗi`, `${c.yellow}/agent${c.reset} Chạy sub-agent`)}
|
|
1138
|
+
${row(`${c.yellow}/read${c.reset} Đọc file`, `${c.yellow}/write${c.reset} Ghi file`)}
|
|
1139
|
+
${row(`${c.yellow}/bash${c.reset} Chạy lệnh terminal`, `${c.yellow}/grep${c.reset} Tìm trong file`)}
|
|
1140
|
+
${row(`${c.yellow}/glob${c.reset} Tìm file theo pattern`, `${c.yellow}/image${c.reset} Phân tích UI`)}
|
|
1141
|
+
${row(`${c.yellow}/paste${c.reset} Dán từ clipboard`, `${c.yellow}/plan${c.reset} Lập kế hoạch`)}
|
|
1142
|
+
${sep}
|
|
1143
|
+
${header(`${c.bright}Git Auto-Pilot${c.reset}`)}
|
|
1144
|
+
${row(`${c.yellow}/commit${c.reset} AI tự viết commit`, `${c.yellow}/review${c.reset} AI review code thay đổi`)}
|
|
1145
|
+
${sep}
|
|
1146
|
+
${header(`${c.bright}Cấu hình Model${c.reset}`)}
|
|
1147
|
+
${row(`${c.yellow}/provider${c.reset} Đổi provider AI`, `${c.yellow}/model${c.reset} Đổi model`)}
|
|
1148
|
+
${row(`${c.yellow}/providers${c.reset} Danh sách provider`, `${c.yellow}/models${c.reset} Danh sách model`)}
|
|
1149
|
+
${sep}
|
|
1150
|
+
${header(`${c.bright}Bộ nhớ & Kỹ năng${c.reset}`)}
|
|
1151
|
+
${row(`${c.yellow}/remember${c.reset} Lưu vào bộ nhớ`, `${c.yellow}/memories${c.reset} Xem bộ nhớ`)}
|
|
1152
|
+
${row(`${c.yellow}/skills${c.reset} Danh sách kỹ năng`, `${c.yellow}/designs${c.reset} Hệ thống thiết kế`)}
|
|
1153
|
+
${c.magenta}╰${line}╯${c.reset}
|
|
1154
|
+
${c.dim}Gõ tin nhắn trực tiếp để chat · ESC để hủy · Prompt tự xếp hàng chờ${c.reset}
|
|
1155
|
+
`);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
showHelp() {
|
|
1159
|
+
console.log(`
|
|
1160
|
+
${colors.cyan}❄ WINTER COMMANDS${colors.reset}
|
|
1161
|
+
${colors.dim}${''.padEnd(50, '─')}${colors.reset}
|
|
1162
|
+
|
|
1163
|
+
${colors.white}Project:${colors.reset}
|
|
1164
|
+
/project, /pwd Show current project
|
|
1165
|
+
/cd <path> Change directory
|
|
1166
|
+
|
|
1167
|
+
${colors.white}Session:${colors.reset}
|
|
1168
|
+
/session Current session info
|
|
1169
|
+
/sessions List all sessions
|
|
1170
|
+
/clear Clear screen
|
|
1171
|
+
|
|
1172
|
+
${colors.white}Memory:${colors.reset}
|
|
1173
|
+
/remember <text> Store in memory
|
|
1174
|
+
/memories Show memories
|
|
1175
|
+
/forget Clear memories
|
|
1176
|
+
|
|
1177
|
+
${colors.white}Plans & Tasks:${colors.reset}
|
|
1178
|
+
/plan, /plans View plans
|
|
1179
|
+
/task <desc> Create task
|
|
1180
|
+
/tasks List tasks
|
|
1181
|
+
/agent [role] <task> Run a subagent
|
|
1182
|
+
|
|
1183
|
+
${colors.white}Tools:${colors.reset}
|
|
1184
|
+
/read <file> Read file
|
|
1185
|
+
/write <file> Write file
|
|
1186
|
+
/glob <pattern> Find files
|
|
1187
|
+
/grep <pattern> Search content
|
|
1188
|
+
/bash <cmd> Run command
|
|
1189
|
+
|
|
1190
|
+
${colors.white}AI & Config:${colors.reset}
|
|
1191
|
+
/provider [name] Show/switch provider and save default
|
|
1192
|
+
/providers List providers
|
|
1193
|
+
/models List configured/cached models
|
|
1194
|
+
/config Show config
|
|
1195
|
+
/model [model] Show/set active provider model
|
|
1196
|
+
|
|
1197
|
+
${colors.white}Design & Skills:${colors.reset}
|
|
1198
|
+
/design Design commands
|
|
1199
|
+
/designs [query] List/search awesome-design-md systems
|
|
1200
|
+
/skill Skills management
|
|
1201
|
+
/skills List Winter/Codex/Claude skills
|
|
1202
|
+
/plugin Plugin management
|
|
1203
|
+
|
|
1204
|
+
${colors.white}Local Sources:${colors.reset}
|
|
1205
|
+
/codex [section] Browse ~/.codex resources
|
|
1206
|
+
/claude [section] Browse ~/.claude resources
|
|
1207
|
+
/karpathy Browse ~/karpathy-tools
|
|
1208
|
+
/agents Read ~/agents.md
|
|
1209
|
+
|
|
1210
|
+
${colors.white}Other:${colors.reset}
|
|
1211
|
+
/help, /? Show this help
|
|
1212
|
+
/exit, /quit Exit Winter
|
|
1213
|
+
|
|
1214
|
+
${colors.dim}${''.padEnd(50, '─')}${colors.reset}
|
|
1215
|
+
Just type your message to chat with Winter!
|
|
1216
|
+
${colors.reset}
|
|
1217
|
+
`);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
async showDesignSystems(query) {
|
|
1221
|
+
try {
|
|
1222
|
+
const designPath = this.getResourcePaths().designs;
|
|
1223
|
+
const entries = await this.listPathEntries(designPath, 100);
|
|
1224
|
+
const filtered = query
|
|
1225
|
+
? entries.filter(e => e.name.toLowerCase().includes(query.toLowerCase()))
|
|
1226
|
+
: entries;
|
|
1227
|
+
if (filtered.length === 0) {
|
|
1228
|
+
console.log(`${colors.dim}No design systems found${query ? ` matching "${query}"` : ''}.${colors.reset}`);
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
console.log(`${colors.cyan}Design Systems:${colors.reset}`);
|
|
1232
|
+
filtered.forEach(e => {
|
|
1233
|
+
const icon = e.isDirectory ? '📁' : '📄';
|
|
1234
|
+
console.log(` ${icon} ${e.name}`);
|
|
1235
|
+
});
|
|
1236
|
+
} catch (error) {
|
|
1237
|
+
console.log(`${colors.red}Cannot read design systems: ${error.message}${colors.reset}`);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
async showAllLocalSkills() {
|
|
1242
|
+
try {
|
|
1243
|
+
const paths = this.getResourcePaths();
|
|
1244
|
+
const sections = [
|
|
1245
|
+
{ label: 'Codex Skills', path: paths.codex.skills },
|
|
1246
|
+
{ label: 'Claude Skills', path: paths.claude.skills },
|
|
1247
|
+
];
|
|
1248
|
+
for (const section of sections) {
|
|
1249
|
+
try {
|
|
1250
|
+
const entries = await this.listPathEntries(section.path, 50);
|
|
1251
|
+
if (entries.length > 0) {
|
|
1252
|
+
console.log(`${colors.cyan}${section.label}:${colors.reset}`);
|
|
1253
|
+
entries.forEach(e => console.log(` ${e.isDirectory ? '📂' : '📄'} ${e.name}`));
|
|
1254
|
+
}
|
|
1255
|
+
} catch { }
|
|
1256
|
+
}
|
|
1257
|
+
} catch (error) {
|
|
1258
|
+
console.log(`${colors.dim}No local skills found.${colors.reset}`);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
async showModels() {
|
|
1263
|
+
try {
|
|
1264
|
+
const providers = this.ai.listProviders();
|
|
1265
|
+
console.log(`${colors.cyan}Configured Models:${colors.reset}`);
|
|
1266
|
+
providers.forEach(p => {
|
|
1267
|
+
const active = p.name === this.ai.getActiveProvider() ? ` ${colors.green}◀ active${colors.reset}` : '';
|
|
1268
|
+
const status = p.ready ? `${colors.green}●${colors.reset}` : `${colors.red}○${colors.reset}`;
|
|
1269
|
+
console.log(` ${status} ${colors.bright}${p.name}${colors.reset}: ${p.model}${active}`);
|
|
1270
|
+
});
|
|
1271
|
+
|
|
1272
|
+
// Try to read cached models
|
|
1273
|
+
const cachePath = this.getResourcePaths().codex.models;
|
|
1274
|
+
const cached = await this.readCachedModels(cachePath);
|
|
1275
|
+
if (cached.length > 0) {
|
|
1276
|
+
console.log(`\n${colors.cyan}Cached Models (${cached.length}):${colors.reset}`);
|
|
1277
|
+
cached.slice(0, 20).forEach(m => console.log(` ${colors.dim}•${colors.reset} ${m}`));
|
|
1278
|
+
if (cached.length > 20) console.log(` ${colors.dim}... and ${cached.length - 20} more${colors.reset}`);
|
|
1279
|
+
}
|
|
1280
|
+
} catch (error) {
|
|
1281
|
+
console.log(`${colors.red}Error listing models: ${error.message}${colors.reset}`);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
async readCachedModels(cachePath) {
|
|
1286
|
+
try {
|
|
1287
|
+
const raw = await fs.readFile(cachePath, 'utf8');
|
|
1288
|
+
return this.extractModelIdsFromCache(raw);
|
|
1289
|
+
} catch {
|
|
1290
|
+
return [];
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
getAgentTools(role) {
|
|
1295
|
+
const base = this.tools.getToolDefinitions();
|
|
1296
|
+
const byName = (names) => base.filter(tool => names.includes(tool.name));
|
|
1297
|
+
|
|
1298
|
+
switch (role) {
|
|
1299
|
+
case 'plan':
|
|
1300
|
+
return byName(['Read', 'Grep', 'Glob', 'TaskCreate', 'TaskUpdate', 'TaskList']);
|
|
1301
|
+
case 'review':
|
|
1302
|
+
return byName(['Read', 'Grep', 'Glob']);
|
|
1303
|
+
case 'debug':
|
|
1304
|
+
return byName(['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob']);
|
|
1305
|
+
case 'research':
|
|
1306
|
+
return byName(['Read', 'Grep', 'Glob', 'WebFetch', 'WebSearch']);
|
|
1307
|
+
default:
|
|
1308
|
+
return byName(['Read', 'Write', 'Edit', 'Bash', 'Glob', 'Grep', 'TaskCreate', 'TaskUpdate', 'TaskList']);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
async runConversation(messages, label = 'Thinking', tools = null) {
|
|
1314
|
+
this.spinner = new Spinner(label + '...');
|
|
1315
|
+
this.spinner.start();
|
|
1316
|
+
|
|
1317
|
+
const startedAt = Date.now();
|
|
1318
|
+
const previousTools = this.ai.tools;
|
|
1319
|
+
if (tools) this.ai.setTools(tools);
|
|
1320
|
+
|
|
1321
|
+
let finalContent = '';
|
|
1322
|
+
let reachedToolLimit = true;
|
|
1323
|
+
let usedTools = false;
|
|
1324
|
+
const toolSummaries = [];
|
|
1325
|
+
const totalUsage = {};
|
|
1326
|
+
try {
|
|
1327
|
+
for (let i = 0; i < 8; i++) {
|
|
1328
|
+
if (this.isCancelled) throw new Error('AbortError');
|
|
1329
|
+
const turn = await this.requestAssistantTurn(messages, {
|
|
1330
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model,
|
|
1331
|
+
enableTools: true,
|
|
1332
|
+
}, startedAt, totalUsage);
|
|
1333
|
+
|
|
1334
|
+
const assistantMsg = turn.assistantMsg || {};
|
|
1335
|
+
const toolCalls = turn.toolCalls || [];
|
|
1336
|
+
|
|
1337
|
+
if (turn.finalContent && toolCalls.length === 0) {
|
|
1338
|
+
finalContent = turn.finalContent;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
if (toolCalls.length === 0) {
|
|
1342
|
+
if (turn.finishReason === 'length') {
|
|
1343
|
+
console.log(`\n${colors.yellow}ℹ Phản hồi bị cắt cụt do hết token. Đang tự động tiếp tục...${colors.reset}`);
|
|
1344
|
+
messages.push({
|
|
1345
|
+
role: 'assistant',
|
|
1346
|
+
content: turn.finalContent || '',
|
|
1347
|
+
});
|
|
1348
|
+
messages.push({
|
|
1349
|
+
role: 'user',
|
|
1350
|
+
content: 'Continue generating the rest of the response.',
|
|
1351
|
+
});
|
|
1352
|
+
continue;
|
|
1353
|
+
}
|
|
1354
|
+
reachedToolLimit = false;
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
usedTools = true;
|
|
1359
|
+
if (this.spinner) this.spinner.stop();
|
|
1360
|
+
|
|
1361
|
+
const BOX_WIDTH = 80;
|
|
1362
|
+
const topLabel = ' AGENT TOOLS EXECUTION ';
|
|
1363
|
+
const topLeft = '╭─';
|
|
1364
|
+
const topRight = '─╮';
|
|
1365
|
+
const topPadLen = BOX_WIDTH - topLeft.length - topRight.length - topLabel.length;
|
|
1366
|
+
const topLine = `${topLeft}${colors.bright}${topLabel}${colors.reset}${colors.magenta}${'─'.repeat(Math.max(0, topPadLen))}${topRight}`;
|
|
1367
|
+
console.log(`\n${colors.magenta}${topLine}${colors.reset}`);
|
|
1368
|
+
messages.push({
|
|
1369
|
+
role: 'assistant',
|
|
1370
|
+
content: assistantMsg.content || '',
|
|
1371
|
+
tool_calls: this.formatToolCallsForMessage(toolCalls),
|
|
1372
|
+
});
|
|
1373
|
+
|
|
1374
|
+
for (const tc of toolCalls) {
|
|
1375
|
+
const { toolName, toolArgs } = tc;
|
|
1376
|
+
const canonicalToolName = this.tools.normalizeToolName(toolName);
|
|
1377
|
+
const enrichedArgs = this.enrichToolArgs(canonicalToolName, toolArgs, messages);
|
|
1378
|
+
|
|
1379
|
+
const icon = canonicalToolName === 'Bash' ? '⚙' : canonicalToolName === 'Read' ? '📖' : canonicalToolName === 'Write' ? '✏️' : canonicalToolName === 'Edit' ? '🔧' : canonicalToolName === 'Grep' ? '🔍' : canonicalToolName === 'Glob' ? '📂' : '⚡';
|
|
1380
|
+
console.log(`${colors.magenta}│${colors.reset} ${icon} ${colors.cyan}${colors.bright}${toolName}${colors.reset}`);
|
|
1381
|
+
|
|
1382
|
+
let proceed = true;
|
|
1383
|
+
if (canonicalToolName === 'Bash') {
|
|
1384
|
+
const cmd = enrichedArgs.command || enrichedArgs.cmd || 'unknown';
|
|
1385
|
+
process.stdout.write(`${colors.magenta}│${colors.reset} ${colors.yellow}⚠ AI muốn chạy: ${colors.bright}${cmd}${colors.reset}\n`);
|
|
1386
|
+
proceed = await new Promise(resolve => {
|
|
1387
|
+
this.rl.question(`${colors.magenta}│${colors.reset} ${colors.yellow}Cho phép? [y/N]: ${colors.reset}`, answer => {
|
|
1388
|
+
resolve(answer.trim().toLowerCase() === 'y');
|
|
1389
|
+
});
|
|
1390
|
+
});
|
|
1391
|
+
if (!proceed) {
|
|
1392
|
+
console.log(`${colors.magenta}│${colors.reset} ${colors.dim}Đã hủy lệnh.${colors.reset}`);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
let result;
|
|
1397
|
+
if (!proceed) {
|
|
1398
|
+
result = { success: false, error: 'User denied permission to execute this command.' };
|
|
1399
|
+
} else {
|
|
1400
|
+
result = toolName
|
|
1401
|
+
? await this.tools.execute(canonicalToolName, enrichedArgs, { cwd: this.projectPath })
|
|
1402
|
+
: { success: false, error: 'Tool call is missing a tool name' };
|
|
1403
|
+
}
|
|
1404
|
+
messages.push({
|
|
1405
|
+
role: 'tool',
|
|
1406
|
+
tool_call_id: tc.id || `tool-${Date.now()}`,
|
|
1407
|
+
content: JSON.stringify(result),
|
|
1408
|
+
});
|
|
1409
|
+
|
|
1410
|
+
const summary = this.formatToolResultForConsole(canonicalToolName, result);
|
|
1411
|
+
if (summary) {
|
|
1412
|
+
toolSummaries.push(`${canonicalToolName}: ${summary}`);
|
|
1413
|
+
const statusIcon = result.success === false ? `${colors.red}✖${colors.reset}` : `${colors.green}✓${colors.reset}`;
|
|
1414
|
+
|
|
1415
|
+
const maxLen = BOX_WIDTH - 8;
|
|
1416
|
+
const lines = summary.split('\n');
|
|
1417
|
+
for (const line of lines) {
|
|
1418
|
+
if (line.length <= maxLen) {
|
|
1419
|
+
console.log(`${colors.magenta}│${colors.reset} ${statusIcon} ${colors.dim}${line}${colors.reset}`);
|
|
1420
|
+
} else {
|
|
1421
|
+
// Word wrap
|
|
1422
|
+
let remaining = line;
|
|
1423
|
+
let first = true;
|
|
1424
|
+
while (remaining.length > 0) {
|
|
1425
|
+
const chunk = remaining.substring(0, maxLen);
|
|
1426
|
+
remaining = remaining.substring(maxLen);
|
|
1427
|
+
const prefix = first ? statusIcon : ' ';
|
|
1428
|
+
console.log(`${colors.magenta}│${colors.reset} ${prefix} ${colors.dim}${chunk}${colors.reset}`);
|
|
1429
|
+
first = false;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
console.log(`${colors.magenta}╰${'─'.repeat(BOX_WIDTH - 1)}╯${colors.reset}\n`);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
if (usedTools && !finalContent) {
|
|
1439
|
+
finalContent = await this.requestFinalAnswer(messages, toolSummaries, startedAt, totalUsage);
|
|
1440
|
+
}
|
|
1441
|
+
} finally {
|
|
1442
|
+
if (tools) this.ai.setTools(previousTools);
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
if ((reachedToolLimit || usedTools) && !finalContent) {
|
|
1446
|
+
if (this.spinner) this.spinner.stop();
|
|
1447
|
+
finalContent = this.buildToolFallbackAnswer(toolSummaries);
|
|
1448
|
+
console.log(`\n${colors.yellow}${finalContent}${colors.reset}\n`);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
return finalContent;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
async requestAssistantTurn(messages, options, startedAt, totalUsage) {
|
|
1455
|
+
if (typeof this.ai.streamRequest === 'function') {
|
|
1456
|
+
try {
|
|
1457
|
+
const streamed = await this.collectAssistantStream(messages, options, startedAt, totalUsage);
|
|
1458
|
+
if (streamed) return streamed;
|
|
1459
|
+
} catch (error) {
|
|
1460
|
+
console.log(`${colors.dim}Streaming failed, retrying normal response: ${error.message}${colors.reset}`);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
const response = await this.ai.sendRequest(messages, options);
|
|
1465
|
+
this.addUsage(totalUsage, response.usage);
|
|
1466
|
+
const assistantMsg = response.choices?.[0]?.message || {};
|
|
1467
|
+
const toolCalls = this.normalizeToolCalls(assistantMsg.tool_calls || []);
|
|
1468
|
+
const finishReason = response.choices?.[0]?.finish_reason;
|
|
1469
|
+
|
|
1470
|
+
if (assistantMsg.content && toolCalls.length === 0) {
|
|
1471
|
+
this.printAssistantAnswer(assistantMsg.content, startedAt, totalUsage);
|
|
1472
|
+
return { assistantMsg, toolCalls, finalContent: assistantMsg.content, finishReason };
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
return { assistantMsg, toolCalls, finalContent: '', finishReason };
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
async collectAssistantStream(messages, options, startedAt, totalUsage) {
|
|
1479
|
+
let content = '';
|
|
1480
|
+
const toolCallParts = [];
|
|
1481
|
+
let finishReason = null;
|
|
1482
|
+
let printed = false;
|
|
1483
|
+
|
|
1484
|
+
for await (const chunk of this.ai.streamRequest(messages, options)) {
|
|
1485
|
+
if (chunk.usage) this.addUsage(totalUsage, chunk.usage);
|
|
1486
|
+
|
|
1487
|
+
const choice = chunk.raw?.choices?.[0] || {};
|
|
1488
|
+
if (choice.finish_reason) {
|
|
1489
|
+
finishReason = choice.finish_reason;
|
|
1490
|
+
}
|
|
1491
|
+
for (const deltaToolCall of choice.delta?.tool_calls || []) {
|
|
1492
|
+
const index = deltaToolCall.index ?? toolCallParts.length;
|
|
1493
|
+
toolCallParts[index] = toolCallParts[index] || {
|
|
1494
|
+
id: '',
|
|
1495
|
+
type: 'function',
|
|
1496
|
+
function: { name: '', arguments: '' },
|
|
1497
|
+
};
|
|
1498
|
+
if (deltaToolCall.id) toolCallParts[index].id = deltaToolCall.id;
|
|
1499
|
+
if (deltaToolCall.type) toolCallParts[index].type = deltaToolCall.type;
|
|
1500
|
+
if (deltaToolCall.function?.name) {
|
|
1501
|
+
toolCallParts[index].function.name += deltaToolCall.function.name;
|
|
1502
|
+
}
|
|
1503
|
+
if (deltaToolCall.function?.arguments) {
|
|
1504
|
+
toolCallParts[index].function.arguments += deltaToolCall.function.arguments;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
if (chunk.content) {
|
|
1509
|
+
if (!printed) {
|
|
1510
|
+
if (this.spinner) this.spinner.stop();
|
|
1511
|
+
process.stdout.write(`\n${colors.white}`);
|
|
1512
|
+
printed = true;
|
|
1513
|
+
}
|
|
1514
|
+
content += chunk.content;
|
|
1515
|
+
process.stdout.write(chunk.content);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
if (this.spinner) this.spinner.stop();
|
|
1520
|
+
if (printed) process.stdout.write(colors.reset);
|
|
1521
|
+
|
|
1522
|
+
const rawToolCalls = toolCallParts
|
|
1523
|
+
.filter(Boolean)
|
|
1524
|
+
.map((toolCall, index) => ({
|
|
1525
|
+
...toolCall,
|
|
1526
|
+
id: toolCall.id || `call-${index}`,
|
|
1527
|
+
}));
|
|
1528
|
+
const toolCalls = this.normalizeToolCalls(rawToolCalls);
|
|
1529
|
+
|
|
1530
|
+
if (toolCalls.length === 0 && content) {
|
|
1531
|
+
console.log(`\n${colors.dim}${this.formatAnswerFooter(startedAt, totalUsage)}${colors.reset}\n`);
|
|
1532
|
+
return {
|
|
1533
|
+
assistantMsg: { content },
|
|
1534
|
+
toolCalls,
|
|
1535
|
+
finalContent: content,
|
|
1536
|
+
finishReason,
|
|
1537
|
+
};
|
|
1538
|
+
} else if (content) {
|
|
1539
|
+
process.stdout.write('\n');
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
return {
|
|
1543
|
+
assistantMsg: {
|
|
1544
|
+
content,
|
|
1545
|
+
tool_calls: this.formatToolCallsForMessage(toolCalls),
|
|
1546
|
+
},
|
|
1547
|
+
toolCalls,
|
|
1548
|
+
finalContent: '',
|
|
1549
|
+
};
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
async simulateTyping(text, color = colors.white) {
|
|
1553
|
+
process.stdout.write(`\n${color}`);
|
|
1554
|
+
process.stdout.write(text);
|
|
1555
|
+
process.stdout.write(colors.reset);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
installSlashSuggestions() {
|
|
1559
|
+
if (!process.stdin.isTTY) return;
|
|
1560
|
+
|
|
1561
|
+
readline.emitKeypressEvents(process.stdin, this.rl);
|
|
1562
|
+
|
|
1563
|
+
process.stdin.on('keypress', (_str, key = {}) => {
|
|
1564
|
+
if (key.ctrl || key.meta) return;
|
|
1565
|
+
|
|
1566
|
+
if (this.slashMenu.open && this.handleSlashMenuKey(key)) {
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
if (key.name === 'escape' && this.isProcessing) {
|
|
1571
|
+
this.isCancelled = true;
|
|
1572
|
+
if (this.spinner) this.spinner.stop();
|
|
1573
|
+
console.log(`\n\x1b[31m[ Đã nhận lệnh HỦY... AI sẽ kết thúc ở thao tác tiếp theo ]\x1b[0m`);
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
queueMicrotask(() => {
|
|
1578
|
+
const line = this.rl?.line || '';
|
|
1579
|
+
if (!line.startsWith('/')) {
|
|
1580
|
+
this.closeSlashMenu();
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
this.openSlashMenu(line);
|
|
1585
|
+
});
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
openSlashMenu(line) {
|
|
1590
|
+
const matches = this.getSlashSuggestions(line);
|
|
1591
|
+
if (matches.length === 0) {
|
|
1592
|
+
this.closeSlashMenu();
|
|
1593
|
+
return;
|
|
1594
|
+
}
|
|
1595
|
+
if (this.slashMenu.open && this.slashMenu.line === line) return;
|
|
1596
|
+
|
|
1597
|
+
this.slashMenu = { open: true, line, items: matches, selected: 0, printedLines: this.slashMenu?.printedLines || 0 };
|
|
1598
|
+
this.renderSlashMenu();
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
closeSlashMenu() {
|
|
1602
|
+
if (this.slashMenu && this.slashMenu.printedLines) {
|
|
1603
|
+
readline.moveCursor(process.stdout, 0, -this.slashMenu.printedLines);
|
|
1604
|
+
readline.clearScreenDown(process.stdout);
|
|
1605
|
+
}
|
|
1606
|
+
this.slashMenu = { open: false, line: '', items: [], selected: 0, printedLines: 0 };
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
handleSlashMenuKey(key = {}) {
|
|
1610
|
+
if (key.name === 'up') {
|
|
1611
|
+
this.moveSlashSelection(-1);
|
|
1612
|
+
return true;
|
|
1613
|
+
}
|
|
1614
|
+
if (key.name === 'down') {
|
|
1615
|
+
this.moveSlashSelection(1);
|
|
1616
|
+
return true;
|
|
1617
|
+
}
|
|
1618
|
+
if (key.name === 'tab' || key.name === 'return') {
|
|
1619
|
+
this.acceptSlashSelection();
|
|
1620
|
+
return true;
|
|
1621
|
+
}
|
|
1622
|
+
if (key.name === 'escape') {
|
|
1623
|
+
this.closeSlashMenu();
|
|
1624
|
+
this.rl.prompt(true);
|
|
1625
|
+
return true;
|
|
1626
|
+
}
|
|
1627
|
+
return false;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
moveSlashSelection(delta) {
|
|
1631
|
+
if (!this.slashMenu.items.length) return;
|
|
1632
|
+
const count = this.slashMenu.items.length;
|
|
1633
|
+
this.slashMenu.selected = (this.slashMenu.selected + delta + count) % count;
|
|
1634
|
+
this.renderSlashMenu();
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
acceptSlashSelection() {
|
|
1638
|
+
const item = this.slashMenu.items[this.slashMenu.selected];
|
|
1639
|
+
if (!item) return;
|
|
1640
|
+
|
|
1641
|
+
const suffix = item.usage ? ' ' : '';
|
|
1642
|
+
this.rl.write(null, { ctrl: true, name: 'u' });
|
|
1643
|
+
this.rl.write(item.cmd + suffix);
|
|
1644
|
+
this.closeSlashMenu();
|
|
1645
|
+
this.rl.prompt(true);
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
renderSlashMenu() {
|
|
1649
|
+
const matches = this.slashMenu.items;
|
|
1650
|
+
if (!matches.length) return;
|
|
1651
|
+
|
|
1652
|
+
if (this.slashMenu.printedLines) {
|
|
1653
|
+
readline.moveCursor(process.stdout, 0, -this.slashMenu.printedLines);
|
|
1654
|
+
readline.clearScreenDown(process.stdout);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
process.stdout.write('\n');
|
|
1658
|
+
process.stdout.write(`${colors.dim}Commands${colors.reset}\n`);
|
|
1659
|
+
matches.forEach((item, index) => {
|
|
1660
|
+
const usage = item.usage ? ` ${colors.dim}${item.usage}${colors.reset}` : '';
|
|
1661
|
+
const pointer = index === this.slashMenu.selected ? `${colors.green}>${colors.reset}` : ' ';
|
|
1662
|
+
process.stdout.write(`${pointer} ${colors.cyan}${item.cmd}${colors.reset} ${colors.dim}${item.desc}${colors.reset}${usage}\n`);
|
|
1663
|
+
});
|
|
1664
|
+
process.stdout.write(`${colors.dim}↑/↓ chọn · Enter/Tab dùng · Esc đóng${colors.reset}\n`);
|
|
1665
|
+
|
|
1666
|
+
this.slashMenu.printedLines = matches.length + 3;
|
|
1667
|
+
this.rl.prompt(true);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
getSlashSuggestions(line) {
|
|
1671
|
+
const query = String(line || '').trim();
|
|
1672
|
+
if (!query.startsWith('/')) return [];
|
|
1673
|
+
if (query === '/') {
|
|
1674
|
+
const preferred = [
|
|
1675
|
+
'/help', '/exit', '/pwd', '/cd',
|
|
1676
|
+
'/provider', '/model', '/models', '/providers',
|
|
1677
|
+
'/read', '/write', '/glob', '/grep', '/bash',
|
|
1678
|
+
'/codex', '/claude', '/karpathy', '/agents',
|
|
1679
|
+
'/resources', '/designs', '/skills',
|
|
1680
|
+
];
|
|
1681
|
+
return preferred
|
|
1682
|
+
.map(cmd => SLASH_COMMANDS.find(item => item.cmd === cmd))
|
|
1683
|
+
.filter(Boolean);
|
|
1684
|
+
}
|
|
1685
|
+
return SLASH_COMMANDS.filter(item => item.cmd.startsWith(query)).slice(0, 12);
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
enrichToolArgs(toolName, toolArgs = {}, messages = []) {
|
|
1689
|
+
const args = toolArgs && typeof toolArgs === 'object' ? { ...toolArgs } : {};
|
|
1690
|
+
const fallbackPath = this.extractPathFromMessages(messages);
|
|
1691
|
+
|
|
1692
|
+
if (fallbackPath) {
|
|
1693
|
+
if (toolName === 'Glob' && !args.pattern && !args.glob && !args.path && !args.cwd) {
|
|
1694
|
+
args.path = fallbackPath;
|
|
1695
|
+
}
|
|
1696
|
+
if (toolName === 'Glob' && (args.pattern || args.glob) && !args.path && !args.cwd) {
|
|
1697
|
+
args.cwd = fallbackPath;
|
|
1698
|
+
}
|
|
1699
|
+
if (toolName === 'Bash' && !args.command && !args.cmd) {
|
|
1700
|
+
args.command = `ls -R "${fallbackPath}"`;
|
|
1701
|
+
}
|
|
1702
|
+
if (toolName === 'Bash' && typeof (args.command ?? args.cmd) === 'string') {
|
|
1703
|
+
const commandKey = args.command ? 'command' : 'cmd';
|
|
1704
|
+
if (/^\s*(ls|dir)(\s+-R)?\s*$/i.test(args[commandKey])) {
|
|
1705
|
+
args[commandKey] = `ls -R "${fallbackPath}"`;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
if (toolName === 'Read' && !args.file_path && !args.path && !args.file) {
|
|
1709
|
+
args.path = fallbackPath;
|
|
1710
|
+
}
|
|
1711
|
+
if (toolName === 'Grep' && !args.path) {
|
|
1712
|
+
args.path = fallbackPath;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
return args;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
extractPathFromMessages(messages = []) {
|
|
1720
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
1721
|
+
const content = messages[i]?.content;
|
|
1722
|
+
if (typeof content !== 'string') continue;
|
|
1723
|
+
|
|
1724
|
+
const matches = [...content.matchAll(/[A-Za-z]:[\\/][^\r\n"'`<>|]+/g)];
|
|
1725
|
+
if (matches.length) {
|
|
1726
|
+
return matches[matches.length - 1][0]
|
|
1727
|
+
.trim()
|
|
1728
|
+
.replace(/[.,;:!?)]$/, '')
|
|
1729
|
+
.replace(/[\u2010-\u2015\u2212]/g, '-');
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
return null;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
async requestFinalAnswer(messages, toolSummaries, startedAt, totalUsage) {
|
|
1736
|
+
const finalMessages = [
|
|
1737
|
+
...messages,
|
|
1738
|
+
{
|
|
1739
|
+
role: 'user',
|
|
1740
|
+
content: [
|
|
1741
|
+
'You have finished using tools.',
|
|
1742
|
+
'Now answer the user directly in the same language as the user.',
|
|
1743
|
+
'Do not call more tools. Do not ask the user to provide files you already read.',
|
|
1744
|
+
'Use the tool results above. If a tool failed, explain the concrete failure briefly and answer with the available evidence.',
|
|
1745
|
+
toolSummaries.length ? `Tool summary:\n${toolSummaries.join('\n')}` : '',
|
|
1746
|
+
].filter(Boolean).join('\n'),
|
|
1747
|
+
},
|
|
1748
|
+
];
|
|
1749
|
+
|
|
1750
|
+
try {
|
|
1751
|
+
if (typeof this.ai.streamRequest === 'function') {
|
|
1752
|
+
return await this.streamFinalAnswer(finalMessages, startedAt, totalUsage);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
const response = await this.ai.sendRequest(finalMessages, {
|
|
1756
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model,
|
|
1757
|
+
enableTools: false,
|
|
1758
|
+
});
|
|
1759
|
+
this.addUsage(totalUsage, response.usage);
|
|
1760
|
+
const content = response.choices?.[0]?.message?.content || '';
|
|
1761
|
+
if (content) {
|
|
1762
|
+
this.printAssistantAnswer(content, startedAt, totalUsage);
|
|
1763
|
+
}
|
|
1764
|
+
return content;
|
|
1765
|
+
} catch (error) {
|
|
1766
|
+
const fallback = this.buildToolFallbackAnswer(toolSummaries, error.message);
|
|
1767
|
+
console.log(`\n${colors.yellow}${fallback}${colors.reset}\n`);
|
|
1768
|
+
return fallback;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
async streamFinalAnswer(messages, startedAt, totalUsage) {
|
|
1773
|
+
let content = '';
|
|
1774
|
+
|
|
1775
|
+
try {
|
|
1776
|
+
process.stdout.write(`\n${colors.white}`);
|
|
1777
|
+
let isFirst = true;
|
|
1778
|
+
for await (const chunk of this.ai.streamRequest(messages, {
|
|
1779
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model,
|
|
1780
|
+
enableTools: false,
|
|
1781
|
+
})) {
|
|
1782
|
+
if (chunk.usage) this.addUsage(totalUsage, chunk.usage);
|
|
1783
|
+
if (chunk.content) {
|
|
1784
|
+
content += chunk.content;
|
|
1785
|
+
process.stdout.write(chunk.content);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
process.stdout.write(colors.reset);
|
|
1789
|
+
|
|
1790
|
+
if (content) {
|
|
1791
|
+
console.log(`\n${colors.dim}${this.formatAnswerFooter(startedAt, totalUsage)}${colors.reset}\n`);
|
|
1792
|
+
return content;
|
|
1793
|
+
}
|
|
1794
|
+
} catch (error) {
|
|
1795
|
+
process.stdout.write(colors.reset);
|
|
1796
|
+
console.log(`${colors.dim}Streaming failed, retrying normal response: ${error.message}${colors.reset}`);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
const response = await this.ai.sendRequest(messages, {
|
|
1800
|
+
model: this.ai.providers[this.ai.getActiveProvider()]?.model,
|
|
1801
|
+
enableTools: false,
|
|
1802
|
+
});
|
|
1803
|
+
this.addUsage(totalUsage, response.usage);
|
|
1804
|
+
content = response.choices?.[0]?.message?.content || '';
|
|
1805
|
+
if (content) {
|
|
1806
|
+
this.printAssistantAnswer(content, startedAt, totalUsage);
|
|
1807
|
+
}
|
|
1808
|
+
return content;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
printAssistantAnswer(content, startedAt, usage = {}) {
|
|
1812
|
+
const formatted = formatMarkdown(content);
|
|
1813
|
+
console.log(`\n${colors.white}${formatted}${colors.reset}`);
|
|
1814
|
+
console.log(`${colors.dim}${'─'.repeat(50)}${colors.reset}`);
|
|
1815
|
+
console.log(`${colors.dim}${this.formatAnswerFooter(startedAt, usage)}${colors.reset}\n`);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
formatAnswerFooter(startedAt, usage = {}) {
|
|
1819
|
+
const elapsedMs = Math.max(0, Date.now() - startedAt);
|
|
1820
|
+
const seconds = (elapsedMs / 1000).toFixed(elapsedMs < 10000 ? 1 : 0);
|
|
1821
|
+
const tokenText = this.formatUsage(usage);
|
|
1822
|
+
return tokenText ? `Time: ${seconds}s · Tokens: ${tokenText}` : `Time: ${seconds}s · Tokens: n/a`;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
addUsage(totalUsage, usage = {}) {
|
|
1826
|
+
if (!usage || typeof usage !== 'object') return totalUsage;
|
|
1827
|
+
|
|
1828
|
+
const prompt = usage.prompt_tokens ?? usage.input_tokens;
|
|
1829
|
+
const completion = usage.completion_tokens ?? usage.output_tokens;
|
|
1830
|
+
const total = usage.total_tokens ?? (
|
|
1831
|
+
typeof prompt === 'number' || typeof completion === 'number'
|
|
1832
|
+
? (prompt || 0) + (completion || 0)
|
|
1833
|
+
: undefined
|
|
1834
|
+
);
|
|
1835
|
+
|
|
1836
|
+
if (typeof prompt === 'number') {
|
|
1837
|
+
totalUsage.prompt_tokens = (totalUsage.prompt_tokens || 0) + prompt;
|
|
1838
|
+
}
|
|
1839
|
+
if (typeof completion === 'number') {
|
|
1840
|
+
totalUsage.completion_tokens = (totalUsage.completion_tokens || 0) + completion;
|
|
1841
|
+
}
|
|
1842
|
+
if (typeof total === 'number') {
|
|
1843
|
+
totalUsage.total_tokens = (totalUsage.total_tokens || 0) + total;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
return totalUsage;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
formatUsage(usage = {}) {
|
|
1850
|
+
const prompt = usage.prompt_tokens;
|
|
1851
|
+
const completion = usage.completion_tokens;
|
|
1852
|
+
const total = usage.total_tokens;
|
|
1853
|
+
|
|
1854
|
+
if (typeof total === 'number' && typeof prompt === 'number' && typeof completion === 'number') {
|
|
1855
|
+
return `${total} total (${prompt} in, ${completion} out)`;
|
|
1856
|
+
}
|
|
1857
|
+
if (typeof total === 'number') return `${total} total`;
|
|
1858
|
+
if (typeof prompt === 'number' || typeof completion === 'number') {
|
|
1859
|
+
return `${prompt || 0} in, ${completion || 0} out`;
|
|
1860
|
+
}
|
|
1861
|
+
return '';
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
buildToolFallbackAnswer(toolSummaries, errorMessage = '') {
|
|
1865
|
+
const lines = ['I used the requested tools but could not get a final model response.'];
|
|
1866
|
+
if (errorMessage) lines.push(`Final answer request failed: ${errorMessage}`);
|
|
1867
|
+
if (toolSummaries.length) {
|
|
1868
|
+
lines.push('Tool results:');
|
|
1869
|
+
lines.push(...toolSummaries.map(summary => `- ${summary}`));
|
|
1870
|
+
}
|
|
1871
|
+
return lines.join('\n');
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
formatToolResultForConsole(toolName, result) {
|
|
1875
|
+
if (!result) return '';
|
|
1876
|
+
if (result.success === false) {
|
|
1877
|
+
return `Tool failed: ${result.error || 'unknown error'}`;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
switch (toolName) {
|
|
1881
|
+
case 'Read':
|
|
1882
|
+
return `Read ${result.path} (${result.lines} lines, ${result.size} chars)`;
|
|
1883
|
+
case 'Write':
|
|
1884
|
+
return result.diff ? `Wrote ${result.path}\n${result.diff}` : `Wrote ${result.path} (${result.size} chars)`;
|
|
1885
|
+
case 'Edit':
|
|
1886
|
+
return result.diff ? `Edited ${result.path}\n${result.diff}` : `Edited ${result.path} (${result.replacements} replacements)`;
|
|
1887
|
+
case 'Glob':
|
|
1888
|
+
return `Found ${result.count} file(s)`;
|
|
1889
|
+
case 'Grep':
|
|
1890
|
+
return `Found ${result.count} match(es)`;
|
|
1891
|
+
case 'Bash': {
|
|
1892
|
+
const output = (result.stdout || result.stderr || '').trim();
|
|
1893
|
+
return output.length > 1200 ? `${output.slice(0, 1200)}\n... truncated` : output;
|
|
1894
|
+
}
|
|
1895
|
+
case 'WebFetch':
|
|
1896
|
+
return `Fetched ${result.url} (${result.length} chars)`;
|
|
1897
|
+
case 'WebSearch':
|
|
1898
|
+
return `Found ${result.count} result(s)`;
|
|
1899
|
+
default:
|
|
1900
|
+
return result.message || '';
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
normalizeToolCalls(toolCalls) {
|
|
1905
|
+
if (!Array.isArray(toolCalls)) return [];
|
|
1906
|
+
|
|
1907
|
+
return toolCalls.map((tc, index) => {
|
|
1908
|
+
const fn = tc.function || {};
|
|
1909
|
+
const rawArgs = fn.arguments ?? tc.arguments ?? tc.input ?? {};
|
|
1910
|
+
|
|
1911
|
+
return {
|
|
1912
|
+
...tc,
|
|
1913
|
+
id: tc.id || `call-${index}`,
|
|
1914
|
+
toolName: fn.name || tc.name || tc.tool_name || tc.type,
|
|
1915
|
+
toolArgs: this.parseToolArguments(rawArgs),
|
|
1916
|
+
};
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
parseToolArguments(rawArgs) {
|
|
1921
|
+
if (!rawArgs) return {};
|
|
1922
|
+
if (typeof rawArgs === 'object') return rawArgs;
|
|
1923
|
+
if (typeof rawArgs !== 'string') return {};
|
|
1924
|
+
|
|
1925
|
+
try {
|
|
1926
|
+
return JSON.parse(rawArgs);
|
|
1927
|
+
} catch {
|
|
1928
|
+
return {};
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
formatToolCallsForMessage(toolCalls) {
|
|
1933
|
+
return toolCalls.map((tc) => ({
|
|
1934
|
+
id: tc.id,
|
|
1935
|
+
type: 'function',
|
|
1936
|
+
function: {
|
|
1937
|
+
name: tc.toolName || tc.function?.name || 'unknown',
|
|
1938
|
+
arguments: JSON.stringify(tc.toolArgs || {}),
|
|
1939
|
+
},
|
|
1940
|
+
}));
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
async chat(message, imageAttachments = []) {
|
|
1944
|
+
try {
|
|
1945
|
+
const needsTools = this.shouldUseTools(message, imageAttachments);
|
|
1946
|
+
const context = needsTools ? await this.getProjectContext() : '';
|
|
1947
|
+
const messages = [
|
|
1948
|
+
{ role: 'system', content: needsTools ? this.getSystemPrompt(context) : this.getFastSystemPrompt() }
|
|
1949
|
+
];
|
|
1950
|
+
|
|
1951
|
+
const history = this.getPromptHistory({
|
|
1952
|
+
limit: needsTools ? 20 : 4,
|
|
1953
|
+
maxEntryChars: needsTools ? 2000 : 350,
|
|
1954
|
+
maxTotalChars: needsTools ? 12000 : 900,
|
|
1955
|
+
});
|
|
1956
|
+
for (const entry of history) {
|
|
1957
|
+
messages.push({ role: entry.role, content: entry.content });
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
// Build user message with optional image attachments
|
|
1961
|
+
if (imageAttachments.length > 0) {
|
|
1962
|
+
const content = [];
|
|
1963
|
+
content.push({ type: 'text', text: message });
|
|
1964
|
+
for (const img of imageAttachments) {
|
|
1965
|
+
content.push({
|
|
1966
|
+
type: 'image_url',
|
|
1967
|
+
image_url: { url: `data:${img.mime};base64,${img.base64}` }
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
messages.push({ role: 'user', content });
|
|
1971
|
+
} else {
|
|
1972
|
+
messages.push({ role: 'user', content: message });
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
const tools = needsTools ? this.getAgentTools('general') : [];
|
|
1976
|
+
const finalContent = await this.runConversation(messages, 'Thinking', tools);
|
|
1977
|
+
|
|
1978
|
+
await this.session.addToHistory({ role: 'user', content: message });
|
|
1979
|
+
await this.session.addToHistory({ role: 'assistant', content: finalContent });
|
|
1980
|
+
|
|
1981
|
+
} catch (error) {
|
|
1982
|
+
console.log(`\n${colors.red}✖ Error: ${error.message}${colors.reset}\n`);
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
shouldUseTools(message = '', imageAttachments = []) {
|
|
1987
|
+
if (imageAttachments.length > 0) return false;
|
|
1988
|
+
const text = String(message || '').toLowerCase();
|
|
1989
|
+
if (/[a-z]:[\\/]|\.([cm]?[jt]sx?|json|md|css|html|py|java|go|rs|php|rb|toml|ya?ml)\b/i.test(text)) {
|
|
1990
|
+
return true;
|
|
1991
|
+
}
|
|
1992
|
+
return /\b(read|write|edit|file|folder|repo|project|code|bug|fix|debug|test|build|run|git|commit|push|pull|npm|node|install|create|delete|copy|move|refactor|grep|glob|bash|terminal|powershell|deploy)\b|sửa|lỗi|đọc|thư mục|dự án|mã|kiểm tra|chạy|tạo|xóa|giao diện|ảnh|màn hình|đẩy|cài|build|test/i.test(text);
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
getPromptHistory({ limit = 20, maxEntryChars = 2000, maxTotalChars = 12000 } = {}) {
|
|
1996
|
+
const raw = this.session.getHistory(limit);
|
|
1997
|
+
const selected = [];
|
|
1998
|
+
let total = 0;
|
|
1999
|
+
|
|
2000
|
+
for (let i = raw.length - 1; i >= 0; i--) {
|
|
2001
|
+
const entry = raw[i];
|
|
2002
|
+
if (!entry || typeof entry.content !== 'string') continue;
|
|
2003
|
+
|
|
2004
|
+
const trimmed = entry.content.length > maxEntryChars
|
|
2005
|
+
? `${entry.content.slice(0, maxEntryChars)}\n[history truncated]`
|
|
2006
|
+
: entry.content;
|
|
2007
|
+
if (total + trimmed.length > maxTotalChars && selected.length > 0) break;
|
|
2008
|
+
|
|
2009
|
+
selected.unshift({ role: entry.role, content: trimmed });
|
|
2010
|
+
total += trimmed.length;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
return selected;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
async runAgent(role, task) {
|
|
2017
|
+
const context = await this.getProjectContext();
|
|
2018
|
+
const messages = [
|
|
2019
|
+
{ role: 'system', content: this.getAgentSystemPrompt(role, context) }
|
|
2020
|
+
];
|
|
2021
|
+
|
|
2022
|
+
const history = this.session.getHistory(20);
|
|
2023
|
+
for (const entry of history) {
|
|
2024
|
+
messages.push({ role: entry.role, content: entry.content });
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
messages.push({ role: 'user', content: `Task: ${task}` });
|
|
2028
|
+
|
|
2029
|
+
const finalContent = await this.runConversation(messages, `Subagent [${role}]`, this.getAgentTools(role));
|
|
2030
|
+
|
|
2031
|
+
await this.session.addToHistory({ role: 'user', content: `[subagent:${role}] ${task}` });
|
|
2032
|
+
await this.session.addToHistory({ role: 'assistant', content: finalContent });
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
async getProjectContext() {
|
|
2036
|
+
const context = [];
|
|
2037
|
+
const projectFiles = ['CLAUDE.md', 'WINTER.md', '.claude/CLAUDE.md', 'package.json'];
|
|
2038
|
+
|
|
2039
|
+
for (const file of projectFiles) {
|
|
2040
|
+
try {
|
|
2041
|
+
const filePath = path.join(this.projectPath, file);
|
|
2042
|
+
const stat = await fs.stat(filePath);
|
|
2043
|
+
if (stat.isFile()) {
|
|
2044
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
2045
|
+
context.push(`[${file}]\n${content.substring(0, 300)}...`);
|
|
2046
|
+
}
|
|
2047
|
+
} catch { }
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
// Git Context
|
|
2051
|
+
try {
|
|
2052
|
+
const { execSync } = await import('child_process');
|
|
2053
|
+
const gitStatus = execSync('git status --short', { cwd: this.projectPath, encoding: 'utf8', stdio: 'pipe' }).trim();
|
|
2054
|
+
if (gitStatus) {
|
|
2055
|
+
context.push(`[Git Status]\n${gitStatus}`);
|
|
2056
|
+
|
|
2057
|
+
// Get brief git diff for context
|
|
2058
|
+
const gitDiff = execSync('git diff', { cwd: this.projectPath, encoding: 'utf8', stdio: 'pipe', maxBuffer: 1024 * 50 }).trim().split('\n').slice(0, 50).join('\n');
|
|
2059
|
+
if (gitDiff) {
|
|
2060
|
+
context.push(`[Git Diff]\n${gitDiff}\n...`);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
} catch (e) {
|
|
2064
|
+
// Not a git repo or git not installed
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
return context.join('\n\n') || 'No project context found.';
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
getSystemPrompt(context = '') {
|
|
2071
|
+
const memories = this.session.getMemory();
|
|
2072
|
+
const plans = this.session.getPlans();
|
|
2073
|
+
|
|
2074
|
+
let memoryStr = memories.length > 0 ? `\n## Memories (Important Context)\n${memories.map(m => `- ${m.text}`).join('\n')}` : '';
|
|
2075
|
+
let plansStr = plans.length > 0 ? `\n## Active Plans & Tasks\n${plans.map(p => `- [${p.status}] ${p.title}: ${p.description}`).join('\n')}` : '';
|
|
2076
|
+
|
|
2077
|
+
return `You are Winter ❄️, an expert AI coding assistant.
|
|
2078
|
+
|
|
2079
|
+
## CRITICAL AI RULES (MUST FOLLOW STRICTLY):
|
|
2080
|
+
1. [THINKING BEFORE CODING]: Always output your thought process briefly before generating code. Think about edge cases, design structure, and syntax correctness.
|
|
2081
|
+
2. [DESIGN EXCELLENCE]: Use rich aesthetics. Default to modern UI frameworks if applicable. Never output plain, ugly HTML/CSS. Ensure responsive, premium feel with micro-animations.
|
|
2082
|
+
3. [CODE QUALITY]: Write clean, modular, SOLID code. Check for syntax errors carefully. Do not generate incomplete code blocks.
|
|
2083
|
+
4. [NO HALLUCINATION]: If you don't know, use tools (Grep/Read/Web) to find out. Do not guess file paths or APIs.
|
|
2084
|
+
5. [TOOL EXECUTION FIRST]: NEVER output full code blocks to the chat and tell the user to copy-paste. ALWAYS use the 'Write' or 'Edit' tool to apply changes directly to their files! The user cannot copy-paste code. You MUST do the work using tools.
|
|
2085
|
+
|
|
2086
|
+
## CRITICAL LANGUAGE RULE
|
|
2087
|
+
**You MUST always respond in Vietnamese (tiếng Việt).** Never respond in Chinese, Japanese, Korean or any other language unless the user explicitly asks you to. This is non-negotiable.
|
|
2088
|
+
|
|
2089
|
+
## Core Principles
|
|
2090
|
+
1. **Think Before Coding** - State assumptions, ask when unclear
|
|
2091
|
+
2. **Simplicity First** - Minimum code that solves the problem
|
|
2092
|
+
3. **Surgical Changes** - Touch only what you must
|
|
2093
|
+
4. **Goal-Driven Execution** - Define success criteria, verify results
|
|
2094
|
+
|
|
2095
|
+
## Tools Available
|
|
2096
|
+
- Read, Write, Edit - File operations
|
|
2097
|
+
- Bash - Execute shell commands
|
|
2098
|
+
- Glob - Find files
|
|
2099
|
+
- Grep - Search content
|
|
2100
|
+
- TaskCreate, TaskUpdate, TaskList - Task management
|
|
2101
|
+
- WebFetch, WebSearch - Research
|
|
2102
|
+
- Vision - Analyze images/screenshots for debugging
|
|
2103
|
+
|
|
2104
|
+
## Guidelines
|
|
2105
|
+
- Call tools when they help - be proactive
|
|
2106
|
+
- After using tools, always provide a direct final answer to the user.
|
|
2107
|
+
- Answer normal questions directly without unnecessary legal or policy disclaimers.
|
|
2108
|
+
- If a request is illegal, unsafe, or harmful, refuse briefly and offer a safe alternative.
|
|
2109
|
+
- Read files before modifying
|
|
2110
|
+
- Make surgical changes
|
|
2111
|
+
- Verify your work
|
|
2112
|
+
- Follow project conventions (check CLAUDE.md)
|
|
2113
|
+
- When user attaches an image, analyze it carefully for UI bugs, errors, layout issues
|
|
2114
|
+
|
|
2115
|
+
## Project
|
|
2116
|
+
Working directory: ${this.projectPath}
|
|
2117
|
+
Current session: ${this.session.getSessionId().substring(0, 8)}
|
|
2118
|
+
${memoryStr}${plansStr}
|
|
2119
|
+
${context ? `\n## Project Context\n${context}` : ''}
|
|
2120
|
+
|
|
2121
|
+
Be helpful, be precise, and get things done. Always respond in Vietnamese.`;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
getFastSystemPrompt() {
|
|
2125
|
+
const memories = this.session.getMemory();
|
|
2126
|
+
const memoryStr = memories.length > 0
|
|
2127
|
+
? `\nContext nhớ ngắn:\n${memories.slice(-8).map(m => `- ${m.text}`).join('\n')}`
|
|
2128
|
+
: '';
|
|
2129
|
+
|
|
2130
|
+
return `Bạn là Winter, trợ lý AI trả lời ngắn gọn bằng tiếng Việt.
|
|
2131
|
+
Trả lời trực tiếp, không gọi tool, không tự bịa thông tin.
|
|
2132
|
+
Nếu người dùng yêu cầu sửa file/chạy lệnh/đọc dự án thì nói ngắn rằng cần dùng chế độ tool.${memoryStr}`;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
// Tab completion
|
|
2136
|
+
completer(line) {
|
|
2137
|
+
const hits = [];
|
|
2138
|
+
|
|
2139
|
+
// Complete slash commands
|
|
2140
|
+
if (line.startsWith('/')) {
|
|
2141
|
+
SLASH_COMMANDS.forEach(cmd => {
|
|
2142
|
+
if (cmd.cmd.startsWith(line)) {
|
|
2143
|
+
hits.push(cmd.cmd + (cmd.sub ? ' ' : ''));
|
|
2144
|
+
}
|
|
2145
|
+
});
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
return [hits.length ? hits : [], line];
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
getAgentSystemPrompt(role, context = '') {
|
|
2152
|
+
const memories = this.session.getMemory();
|
|
2153
|
+
const plans = this.session.getPlans();
|
|
2154
|
+
|
|
2155
|
+
let memoryStr = memories.length > 0 ? `\n## Memories (Important Context)\n${memories.map(m => `- ${m.text}`).join('\n')}` : '';
|
|
2156
|
+
let plansStr = plans.length > 0 ? `\n## Active Plans & Tasks\n${plans.map(p => `- [${p.status}] ${p.title}: ${p.description}`).join('\n')}` : '';
|
|
2157
|
+
|
|
2158
|
+
let rolePrompt = '';
|
|
2159
|
+
switch (role) {
|
|
2160
|
+
case 'plan':
|
|
2161
|
+
rolePrompt = `You are a Winter planning subagent. Break the request into a concise step-by-step plan, note dependencies, and keep the response short.`;
|
|
2162
|
+
break;
|
|
2163
|
+
case 'review':
|
|
2164
|
+
rolePrompt = `You are a Winter review subagent. Critique the request or implementation with specific issues, edge cases, and concrete improvements.`;
|
|
2165
|
+
break;
|
|
2166
|
+
case 'debug':
|
|
2167
|
+
rolePrompt = `You are a Winter debugging subagent. Focus on root cause, reproduction, and the smallest fix.`;
|
|
2168
|
+
break;
|
|
2169
|
+
case 'research':
|
|
2170
|
+
rolePrompt = `You are a Winter research subagent. Gather the important facts, compare options, and summarize only what matters.`;
|
|
2171
|
+
break;
|
|
2172
|
+
case 'browser':
|
|
2173
|
+
rolePrompt = `You are a Winter browser subagent. Bạn CÓ QUYỀN sử dụng tool 'BrowserDebug' để tương tác với trình duyệt. Hãy dùng nó để mở URL, chụp ảnh màn hình (nếu cần), hoặc chạy JS để kiểm tra trang web.`;
|
|
2174
|
+
break;
|
|
2175
|
+
default:
|
|
2176
|
+
rolePrompt = `You are a Winter coding subagent. Solve the task directly, use tools when needed, and return a concise result.`;
|
|
2177
|
+
break;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
return `## CRITICAL AI RULES (MUST FOLLOW STRICTLY):
|
|
2181
|
+
1. [THINKING BEFORE CODING]: Always output your thought process briefly before generating code. Think about edge cases, design structure, and syntax correctness.
|
|
2182
|
+
2. [DESIGN EXCELLENCE]: Use rich aesthetics. Default to modern UI frameworks if applicable. Never output plain, ugly HTML/CSS. Ensure responsive, premium feel with micro-animations.
|
|
2183
|
+
3. [CODE QUALITY]: Write clean, modular, SOLID code. Check for syntax errors carefully. Do not generate incomplete code blocks.
|
|
2184
|
+
4. [NO HALLUCINATION]: If you don't know, use tools (Grep/Read/Web) to find out. Do not guess file paths or APIs.
|
|
2185
|
+
|
|
2186
|
+
${rolePrompt}
|
|
2187
|
+
|
|
2188
|
+
## Project
|
|
2189
|
+
Working directory: ${this.projectPath}
|
|
2190
|
+
Current session: ${this.session.getSessionId().substring(0, 8)}
|
|
2191
|
+
${memoryStr}${plansStr}
|
|
2192
|
+
${context ? `\n## Project Context\n${context}` : ''}`;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
getAgentTools(role) {
|
|
2196
|
+
// Trả về tất cả công cụ hiện có trong executor
|
|
2197
|
+
return this.tools.getToolDefinitions();
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
async getClipboardContent() {
|
|
2201
|
+
try {
|
|
2202
|
+
const { execSync } = await import('child_process');
|
|
2203
|
+
if (process.platform === 'win32') {
|
|
2204
|
+
return execSync('powershell.exe -NoProfile -Command "Get-Clipboard -Raw"').toString().trim();
|
|
2205
|
+
} else if (process.platform === 'darwin') {
|
|
2206
|
+
return execSync('pbpaste').toString().trim();
|
|
2207
|
+
} else {
|
|
2208
|
+
return execSync('xclip -selection clipboard -o').toString().trim();
|
|
2209
|
+
}
|
|
2210
|
+
} catch (e) {
|
|
2211
|
+
return null;
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
}
|