myagent-ai 1.0.0
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/Dockerfile +30 -0
- package/README.md +333 -0
- package/agents/__init__.py +6 -0
- package/agents/__pycache__/main_agent.cpython-312.pyc +0 -0
- package/agents/base.py +115 -0
- package/agents/main_agent.py +695 -0
- package/agents/memory_agent.py +313 -0
- package/agents/tool_agent.py +248 -0
- package/chatbot/__init__.py +5 -0
- package/chatbot/base.py +124 -0
- package/chatbot/discord_bot.py +146 -0
- package/chatbot/feishu_bot.py +548 -0
- package/chatbot/manager.py +164 -0
- package/chatbot/qq_bot.py +189 -0
- package/chatbot/telegram_bot.py +167 -0
- package/chatbot/wechat_bot.py +558 -0
- package/communication/__init__.py +66 -0
- package/communication/channel.py +576 -0
- package/communication/crypto.py +347 -0
- package/communication/manager.py +397 -0
- package/communication/peer.py +156 -0
- package/config.py +464 -0
- package/core/__init__.py +10 -0
- package/core/config_broadcast.py +276 -0
- package/core/llm.py +878 -0
- package/core/logger.py +241 -0
- package/core/task_queue.py +362 -0
- package/core/utils.py +184 -0
- package/executor/__init__.py +4 -0
- package/executor/__pycache__/engine.cpython-312.pyc +0 -0
- package/executor/engine.py +1215 -0
- package/groups/__init__.py +15 -0
- package/groups/manager.py +724 -0
- package/knowledge/__init__.py +4 -0
- package/knowledge/rag.py +444 -0
- package/main.py +801 -0
- package/memory/__init__.py +4 -0
- package/memory/manager.py +840 -0
- package/organization/__init__.py +4 -0
- package/organization/manager.py +350 -0
- package/package.json +58 -0
- package/requirements.txt +59 -0
- package/setup.py +40 -0
- package/skills/ASR/LICENSE.txt +21 -0
- package/skills/ASR/SKILL.md +580 -0
- package/skills/ASR/scripts/asr.ts +27 -0
- package/skills/LLM/LICENSE.txt +21 -0
- package/skills/LLM/SKILL.md +856 -0
- package/skills/LLM/scripts/chat.ts +32 -0
- package/skills/TTS/LICENSE.txt +21 -0
- package/skills/TTS/SKILL.md +735 -0
- package/skills/TTS/tts.ts +25 -0
- package/skills/VLM/LICENSE.txt +21 -0
- package/skills/VLM/SKILL.md +588 -0
- package/skills/VLM/scripts/vlm.ts +57 -0
- package/skills/__init__.py +5 -0
- package/skills/agent-browser/SKILL.md +328 -0
- package/skills/ai-news-collectors/SKILL.md +157 -0
- package/skills/ai-news-collectors/_meta.json +6 -0
- package/skills/ai-news-collectors/references/sources.md +128 -0
- package/skills/aminer-open-academic/SKILL.md +312 -0
- package/skills/aminer-open-academic/_meta.json +6 -0
- package/skills/aminer-open-academic/evals/evals.json +46 -0
- package/skills/aminer-open-academic/references/api-catalog.md +1032 -0
- package/skills/aminer-open-academic/scripts/__pycache__/aminer_client.cpython-312.pyc +0 -0
- package/skills/aminer-open-academic/scripts/aminer_client.py +875 -0
- package/skills/auto-target-tracker/SKILL.md +317 -0
- package/skills/base.py +147 -0
- package/skills/blog-writer/2024-02-17-radical-transparency-sales.md +35 -0
- package/skills/blog-writer/2024-02-17-raycast-spotlight-superpowers.md +33 -0
- package/skills/blog-writer/2024-02-17-short-form-content-marketing.md +47 -0
- package/skills/blog-writer/2024-02-17-typing-speed-benefits.md +33 -0
- package/skills/blog-writer/2024-03-14-effective-ai-prompts.md +55 -0
- package/skills/blog-writer/2024-11-08-ai-revolutionizing-entry-level-sales.md +43 -0
- package/skills/blog-writer/2025-11-12-why-ai-art-is-useless.md +49 -0
- package/skills/blog-writer/README.md +2 -0
- package/skills/blog-writer/SKILL.md +158 -0
- package/skills/blog-writer/__pycache__/manage_examples.cpython-312.pyc +0 -0
- package/skills/blog-writer/_meta.json +6 -0
- package/skills/blog-writer/manage_examples.py +90 -0
- package/skills/blog-writer/style-guide.md +160 -0
- package/skills/browser_skill.py +146 -0
- package/skills/coding-agent/SKILL.md +120 -0
- package/skills/coding-agent/_meta.json +6 -0
- package/skills/coding-agent/criteria.md +48 -0
- package/skills/coding-agent/execution.md +42 -0
- package/skills/coding-agent/memory-template.md +38 -0
- package/skills/coding-agent/planning.md +31 -0
- package/skills/coding-agent/state.md +60 -0
- package/skills/coding-agent/verification.md +39 -0
- package/skills/content-strategy/SKILL.md +181 -0
- package/skills/content-strategy/_meta.json +6 -0
- package/skills/contentanalysis/ExtractWisdom/SKILL.md +229 -0
- package/skills/contentanalysis/ExtractWisdom/Workflows/Extract.md +60 -0
- package/skills/contentanalysis/SKILL.md +14 -0
- package/skills/docx/CHANGELOG.md +85 -0
- package/skills/docx/LICENSE.txt +30 -0
- package/skills/docx/SKILL.md +455 -0
- package/skills/docx/docx-js.md +681 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/__pycache__/pack.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/__pycache__/unpack.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/base.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/docx.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/pptx.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/__pycache__/redlining.cpython-312.pyc +0 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +615 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/add_toc_placeholders.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/document.cpython-312.pyc +0 -0
- package/skills/docx/scripts/__pycache__/utilities.cpython-312.pyc +0 -0
- package/skills/docx/scripts/add_toc_placeholders.py +220 -0
- package/skills/docx/scripts/document.py +1302 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/dream-interpreter/SKILL.md +88 -0
- package/skills/dream-interpreter/assets/example_asset.txt +24 -0
- package/skills/dream-interpreter/references/api_reference.md +34 -0
- package/skills/dream-interpreter/references/interpretation-guide.md +83 -0
- package/skills/dream-interpreter/references/output-schema.md +65 -0
- package/skills/dream-interpreter/references/questioning-strategy.md +62 -0
- package/skills/dream-interpreter/references/visual-mapping.md +81 -0
- package/skills/dream-interpreter/scripts/__pycache__/example.cpython-312.pyc +0 -0
- package/skills/dream-interpreter/scripts/example.py +19 -0
- package/skills/dream-interpreter/skill.json +7 -0
- package/skills/file_skill.py +246 -0
- package/skills/finance/Finance_API_Doc.md +445 -0
- package/skills/finance/SKILL.md +53 -0
- package/skills/fullstack-dev/SKILL.md +205 -0
- package/skills/get-fortune-analysis/SKILL.md +370 -0
- package/skills/get-fortune-analysis/lunar_python.py +91 -0
- package/skills/gift-evaluator/SKILL.md +83 -0
- package/skills/gift-evaluator/__pycache__/html_tools.cpython-312.pyc +0 -0
- package/skills/gift-evaluator/html_tools.py +268 -0
- package/skills/image-edit/LICENSE.txt +21 -0
- package/skills/image-edit/SKILL.md +896 -0
- package/skills/image-edit/scripts/image-edit.ts +36 -0
- package/skills/image-generation/LICENSE.txt +21 -0
- package/skills/image-generation/SKILL.md +583 -0
- package/skills/image-generation/scripts/image-generation.ts +28 -0
- package/skills/image-understand/LICENSE.txt +21 -0
- package/skills/image-understand/SKILL.md +855 -0
- package/skills/image-understand/scripts/image-understand.ts +41 -0
- package/skills/interview-designer/README.md +70 -0
- package/skills/interview-designer/SKILL.md +53 -0
- package/skills/interview-designer/_meta.json +6 -0
- package/skills/interview-designer/references/design_rationale.md +43 -0
- package/skills/interview-designer/templates/interview_guide_template.md +62 -0
- package/skills/market-research-reports/SKILL.md +901 -0
- package/skills/market-research-reports/assets/FORMATTING_GUIDE.md +428 -0
- package/skills/market-research-reports/assets/market_report_template.tex +1380 -0
- package/skills/market-research-reports/assets/market_research.sty +564 -0
- package/skills/market-research-reports/references/data_analysis_patterns.md +548 -0
- package/skills/market-research-reports/references/report_structure_guide.md +999 -0
- package/skills/market-research-reports/references/visual_generation_guide.md +1077 -0
- package/skills/market-research-reports/scripts/__pycache__/generate_market_visuals.cpython-312.pyc +0 -0
- package/skills/market-research-reports/scripts/generate_market_visuals.py +529 -0
- package/skills/marketing-mode/README.md +49 -0
- package/skills/marketing-mode/SKILL.md +693 -0
- package/skills/marketing-mode/_meta.json +6 -0
- package/skills/marketing-mode/mode-prompt.md +39 -0
- package/skills/marketing-mode/skill.json +51 -0
- package/skills/mindfulness-meditation/SKILL.md +65 -0
- package/skills/mindfulness-meditation/_meta.json +6 -0
- package/skills/multi-search-engine/CHANGELOG.md +15 -0
- package/skills/multi-search-engine/CHANNELLOG.md +48 -0
- package/skills/multi-search-engine/SKILL.md +78 -0
- package/skills/multi-search-engine/_meta.json +6 -0
- package/skills/multi-search-engine/config.json +14 -0
- package/skills/multi-search-engine/metadata.json +7 -0
- package/skills/multi-search-engine/references/international-search.md +651 -0
- package/skills/pdf/LICENSE.txt +30 -0
- package/skills/pdf/SKILL.md +1534 -0
- package/skills/pdf/forms.md +205 -0
- package/skills/pdf/reference.md +765 -0
- package/skills/pdf/scripts/__pycache__/add_zai_metadata.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_bounding_boxes.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_bounding_boxes_test.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/check_fillable_fields.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/convert_pdf_to_images.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/create_validation_image.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/extract_form_field_info.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/fill_fillable_fields.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/fill_pdf_form_with_annotations.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/__pycache__/sanitize_code.cpython-312.pyc +0 -0
- package/skills/pdf/scripts/add_zai_metadata.py +172 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/pdf/scripts/sanitize_code.py +110 -0
- package/skills/podcast-generate/LICENSE.txt +21 -0
- package/skills/podcast-generate/SKILL.md +198 -0
- package/skills/podcast-generate/generate.ts +661 -0
- package/skills/podcast-generate/package.json +30 -0
- package/skills/podcast-generate/readme.md +177 -0
- package/skills/podcast-generate/test_data/segments.jsonl +3 -0
- package/skills/podcast-generate/tsconfig.json +26 -0
- package/skills/pptx/LICENSE.txt +30 -0
- package/skills/pptx/SKILL.md +507 -0
- package/skills/pptx/html2pptx.md +625 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/__pycache__/pack.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/__pycache__/unpack.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/__pycache__/validate.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/base.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/docx.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/pptx.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/__pycache__/redlining.cpython-312.pyc +0 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/__pycache__/inventory.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/inventory.cpython-313.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/rearrange.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/replace.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/__pycache__/thumbnail.cpython-312.pyc +0 -0
- package/skills/pptx/scripts/html2pptx.js +1044 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/qingyan-research/SKILL.md +294 -0
- package/skills/qingyan-research/__pycache__/generate_html.cpython-312.pyc +0 -0
- package/skills/qingyan-research/generate_html.py +33 -0
- package/skills/registry.py +344 -0
- package/skills/search_skill.py +228 -0
- package/skills/seo-content-writer/SKILL.md +661 -0
- package/skills/seo-content-writer/_meta.json +6 -0
- package/skills/seo-content-writer/references/content-structure-templates.md +875 -0
- package/skills/seo-content-writer/references/title-formulas.md +339 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/__pycache__/generate_review.cpython-312.pyc +0 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/package_skill.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/utils.cpython-312.pyc +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +236 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/skill-finder-cn/SKILL.md +66 -0
- package/skills/skill-finder-cn/_meta.json +6 -0
- package/skills/skill-finder-cn/package.json +5 -0
- package/skills/skill-finder-cn/scripts/search.sh +15 -0
- package/skills/skill-vetter/SKILL.md +137 -0
- package/skills/stock-analysis-skill/SKILL.md +156 -0
- package/skills/stock-analysis-skill/package.json +21 -0
- package/skills/stock-analysis-skill/src/analyzer.ts +264 -0
- package/skills/stock-analysis-skill/src/dataFetcher.ts +130 -0
- package/skills/stock-analysis-skill/src/dividend.ts +226 -0
- package/skills/stock-analysis-skill/src/index.ts +327 -0
- package/skills/stock-analysis-skill/src/rumorScanner.ts +200 -0
- package/skills/stock-analysis-skill/src/types.ts +167 -0
- package/skills/stock-analysis-skill/src/watchlist.ts +292 -0
- package/skills/stock-analysis-skill/tsconfig.json +15 -0
- package/skills/storyboard-manager/SKILL.md +532 -0
- package/skills/storyboard-manager/index.js +9 -0
- package/skills/storyboard-manager/package.json +11 -0
- package/skills/storyboard-manager/references/character_development.md +232 -0
- package/skills/storyboard-manager/references/story_structures.md +148 -0
- package/skills/storyboard-manager/scripts/__pycache__/consistency_checker.cpython-312.pyc +0 -0
- package/skills/storyboard-manager/scripts/__pycache__/timeline_tracker.cpython-312.pyc +0 -0
- package/skills/storyboard-manager/scripts/consistency_checker.py +391 -0
- package/skills/storyboard-manager/scripts/timeline_tracker.py +352 -0
- package/skills/system_skill.py +249 -0
- package/skills/ui-ux-pro-max/SKILL.md +43 -0
- package/skills/ui-ux-pro-max/_meta.json +6 -0
- package/skills/ui-ux-pro-max/assets/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/assets/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/assets/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/assets/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/assets/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/assets/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/assets/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/assets/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/assets/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/assets/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/assets/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/references/upstream-README.md +488 -0
- package/skills/ui-ux-pro-max/references/upstream-skill-content.md +288 -0
- package/skills/ui-ux-pro-max/scripts/__init__.py +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1071 -0
- package/skills/ui-ux-pro-max/scripts/search.py +111 -0
- package/skills/video-generation/LICENSE.txt +21 -0
- package/skills/video-generation/SKILL.md +1082 -0
- package/skills/video-generation/scripts/video.ts +168 -0
- package/skills/video-understand/LICENSE.txt +21 -0
- package/skills/video-understand/SKILL.md +916 -0
- package/skills/video-understand/scripts/video-understand.ts +41 -0
- package/skills/visual-design-foundations/SKILL.md +318 -0
- package/skills/visual-design-foundations/references/color-systems.md +417 -0
- package/skills/visual-design-foundations/references/spacing-iconography.md +425 -0
- package/skills/visual-design-foundations/references/typography-systems.md +432 -0
- package/skills/web-reader/LICENSE.txt +21 -0
- package/skills/web-reader/SKILL.md +1140 -0
- package/skills/web-reader/scripts/web-reader.ts +37 -0
- package/skills/web-search/LICENSE.txt +21 -0
- package/skills/web-search/SKILL.md +912 -0
- package/skills/web-search/scripts/web_search.ts +44 -0
- package/skills/web-shader-extractor/SKILL.md +145 -0
- package/skills/web-shader-extractor/references/config-extraction.md +50 -0
- package/skills/web-shader-extractor/references/encoded-definitions.md +53 -0
- package/skills/web-shader-extractor/references/extraction-workflow.md +61 -0
- package/skills/web-shader-extractor/references/porting-strategy.md +164 -0
- package/skills/web-shader-extractor/references/shader-injection.md +126 -0
- package/skills/web-shader-extractor/references/shaders-com.md +190 -0
- package/skills/web-shader-extractor/references/tech-signatures.md +54 -0
- package/skills/web-shader-extractor/references/tsl-extraction.md +41 -0
- package/skills/web-shader-extractor/references/unicorn-studio.md +353 -0
- package/skills/web-shader-extractor/scripts/fetch-rendered-dom.mjs +153 -0
- package/skills/web-shader-extractor/scripts/scan-bundle.sh +76 -0
- package/skills/writing-plans/SKILL.md +116 -0
- package/skills/writing-plans/_meta.json +6 -0
- package/skills/xlsx/LICENSE.txt +30 -0
- package/skills/xlsx/SKILL.md +496 -0
- package/skills/xlsx/__pycache__/recalc.cpython-312.pyc +0 -0
- package/skills/xlsx/recalc.py +178 -0
- package/start.sh +36 -0
- package/web/__init__.py +1 -0
- package/web/__pycache__/api_server.cpython-312.pyc +0 -0
- package/web/api_server.py +2043 -0
- package/web/ui/chat.html +3235 -0
- package/web/ui/index.html +458 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dividend.ts
|
|
3
|
+
* 股息分析模块(适配 finance skill)
|
|
4
|
+
* 移植原版评分逻辑:安全评分 / CAGR / 连续增长年数 / 派息可持续性
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import ZAI from "z-ai-web-dev-sdk";
|
|
8
|
+
import { DividendAnalysis, PayoutStatus, IncomeRating } from "./types";
|
|
9
|
+
|
|
10
|
+
// ── 核心评分逻辑(与原版完全一致)──────────────────────────
|
|
11
|
+
|
|
12
|
+
function calcPayoutStatus(payoutRatio: number | null): PayoutStatus {
|
|
13
|
+
if (payoutRatio === null) return "unknown";
|
|
14
|
+
if (payoutRatio < 40) return "safe";
|
|
15
|
+
if (payoutRatio < 60) return "moderate";
|
|
16
|
+
if (payoutRatio < 80) return "high";
|
|
17
|
+
return "unsustainable";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function calcSafetyScore(data: {
|
|
21
|
+
payoutRatio: number | null;
|
|
22
|
+
dividendGrowth5y: number | null;
|
|
23
|
+
consecutiveYears: number | null;
|
|
24
|
+
dividendYield: number | null;
|
|
25
|
+
}): { score: number; factors: string[] } {
|
|
26
|
+
let score = 50;
|
|
27
|
+
const factors: string[] = [];
|
|
28
|
+
|
|
29
|
+
// 派息率(±20)
|
|
30
|
+
if (data.payoutRatio !== null) {
|
|
31
|
+
if (data.payoutRatio < 40) { score += 20; factors.push(`派息率健康(${data.payoutRatio.toFixed(0)}%)`); }
|
|
32
|
+
else if (data.payoutRatio < 60) { score += 10; factors.push(`派息率适中(${data.payoutRatio.toFixed(0)}%)`); }
|
|
33
|
+
else if (data.payoutRatio < 80) { score -= 10; factors.push(`派息率偏高(${data.payoutRatio.toFixed(0)}%)`); }
|
|
34
|
+
else { score -= 20; factors.push(`派息率不可持续(${data.payoutRatio.toFixed(0)}%)`); }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 5年增长率(±15)
|
|
38
|
+
if (data.dividendGrowth5y !== null) {
|
|
39
|
+
if (data.dividendGrowth5y > 10) { score += 15; factors.push(`股息增长强劲(${data.dividendGrowth5y.toFixed(1)}% CAGR)`); }
|
|
40
|
+
else if (data.dividendGrowth5y > 5) { score += 10; factors.push(`股息增长良好(${data.dividendGrowth5y.toFixed(1)}% CAGR)`); }
|
|
41
|
+
else if (data.dividendGrowth5y > 0) { score += 5; factors.push(`股息小幅增长(${data.dividendGrowth5y.toFixed(1)}% CAGR)`); }
|
|
42
|
+
else { score -= 15; factors.push(`股息下降(${data.dividendGrowth5y.toFixed(1)}% CAGR)`); }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 连续增长年数(±15)
|
|
46
|
+
if (data.consecutiveYears !== null) {
|
|
47
|
+
if (data.consecutiveYears >= 25) { score += 15; factors.push(`股息贵族(连续${data.consecutiveYears}年增长)`); }
|
|
48
|
+
else if (data.consecutiveYears >= 10) { score += 10; factors.push(`长期稳定股息(${data.consecutiveYears}年)`); }
|
|
49
|
+
else if (data.consecutiveYears >= 5) { score += 5; factors.push(`股息稳定(${data.consecutiveYears}年)`); }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 高收益率风险(-10)
|
|
53
|
+
if (data.dividendYield !== null) {
|
|
54
|
+
if (data.dividendYield > 8) { score -= 10; factors.push(`收益率过高(${data.dividendYield.toFixed(1)}%),需核实可持续性`); }
|
|
55
|
+
else if (data.dividendYield < 1) { factors.push(`收益率偏低(${data.dividendYield.toFixed(2)}%)`); }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return { score: Math.max(0, Math.min(100, score)), factors };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function calcIncomeRating(safetyScore: number): IncomeRating {
|
|
62
|
+
if (safetyScore >= 80) return "excellent";
|
|
63
|
+
if (safetyScore >= 60) return "good";
|
|
64
|
+
if (safetyScore >= 40) return "moderate";
|
|
65
|
+
return "poor";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── 通过 finance skill 获取股息数据 ──────────────────────
|
|
69
|
+
|
|
70
|
+
async function fetchDividendData(ticker: string): Promise<Record<string, any>> {
|
|
71
|
+
const zai = await ZAI.create();
|
|
72
|
+
|
|
73
|
+
const completion = await zai.chat.completions.create({
|
|
74
|
+
messages: [{
|
|
75
|
+
role: "user",
|
|
76
|
+
content: `请查询 ${ticker} 的股息数据,只返回 JSON,包含:
|
|
77
|
+
name(公司名称), currentPrice(当前股价),
|
|
78
|
+
dividendYield(年化股息率%), annualDividend(年度每股股息),
|
|
79
|
+
trailingEps(过去12月每股收益),
|
|
80
|
+
exDividendDate(除权日 YYYY-MM-DD 格式),
|
|
81
|
+
paymentFrequency("monthly"/"quarterly"/"annual",根据派息频率判断),
|
|
82
|
+
dividendHistory(近5年年度股息数组,每项含 year 和 total,从新到旧排序),
|
|
83
|
+
consecutiveYears(连续股息增长年数,整数),
|
|
84
|
+
dividendGrowth5y(近5年股息 CAGR %)。
|
|
85
|
+
缺失字段填 null,不得捏造。`,
|
|
86
|
+
}],
|
|
87
|
+
thinking: { type: "disabled" },
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const raw = completion.choices[0]?.message?.content ?? "{}";
|
|
91
|
+
return JSON.parse(raw.replace(/```json|```/g, "").trim());
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ── 主分析函数 ────────────────────────────────────────────
|
|
95
|
+
|
|
96
|
+
export async function analyzeDividend(ticker: string): Promise<DividendAnalysis> {
|
|
97
|
+
ticker = ticker.toUpperCase();
|
|
98
|
+
|
|
99
|
+
let raw: Record<string, any> = {};
|
|
100
|
+
try {
|
|
101
|
+
raw = await fetchDividendData(ticker);
|
|
102
|
+
} catch (err: any) {
|
|
103
|
+
return {
|
|
104
|
+
ticker, name: ticker, currentPrice: null,
|
|
105
|
+
dividendYield: null, annualDividend: null,
|
|
106
|
+
payoutRatio: null, payoutStatus: "unknown",
|
|
107
|
+
dividendGrowth5y: null, consecutiveYears: null,
|
|
108
|
+
exDividendDate: null, paymentFrequency: null,
|
|
109
|
+
safetyScore: 0, safetyFactors: [`数据获取失败:${err.message}`],
|
|
110
|
+
incomeRating: "poor", dividendHistory: [],
|
|
111
|
+
summary: `${ticker} 股息数据获取失败。`,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 无股息
|
|
116
|
+
if (!raw.annualDividend || raw.annualDividend === 0) {
|
|
117
|
+
return {
|
|
118
|
+
ticker, name: raw.name ?? ticker,
|
|
119
|
+
currentPrice: raw.currentPrice ?? null,
|
|
120
|
+
dividendYield: null, annualDividend: null,
|
|
121
|
+
payoutRatio: null, payoutStatus: "no_dividend",
|
|
122
|
+
dividendGrowth5y: null, consecutiveYears: null,
|
|
123
|
+
exDividendDate: null, paymentFrequency: null,
|
|
124
|
+
safetyScore: 0, safetyFactors: ["该股票不派息"],
|
|
125
|
+
incomeRating: "no_dividend", dividendHistory: [],
|
|
126
|
+
summary: `${ticker} 目前不派发股息。`,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 计算派息率
|
|
131
|
+
const payoutRatio = (raw.trailingEps && raw.trailingEps > 0 && raw.annualDividend)
|
|
132
|
+
? parseFloat(((raw.annualDividend / raw.trailingEps) * 100).toFixed(1))
|
|
133
|
+
: null;
|
|
134
|
+
|
|
135
|
+
const payoutStatus = calcPayoutStatus(payoutRatio);
|
|
136
|
+
const { score: safetyScore, factors: safetyFactors } = calcSafetyScore({
|
|
137
|
+
payoutRatio,
|
|
138
|
+
dividendGrowth5y: raw.dividendGrowth5y ?? null,
|
|
139
|
+
consecutiveYears: raw.consecutiveYears ?? null,
|
|
140
|
+
dividendYield: raw.dividendYield ?? null,
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const incomeRating = calcIncomeRating(safetyScore);
|
|
144
|
+
|
|
145
|
+
// 生成摘要
|
|
146
|
+
const parts: string[] = [];
|
|
147
|
+
if (raw.dividendYield) parts.push(`收益率 ${Number(raw.dividendYield).toFixed(2)}%`);
|
|
148
|
+
if (payoutRatio) parts.push(`派息率 ${payoutRatio.toFixed(0)}%`);
|
|
149
|
+
if (raw.dividendGrowth5y) parts.push(`5年增长 ${Number(raw.dividendGrowth5y) > 0 ? "+" : ""}${Number(raw.dividendGrowth5y).toFixed(1)}%`);
|
|
150
|
+
if (raw.consecutiveYears && raw.consecutiveYears >= 5) parts.push(`连续增长 ${raw.consecutiveYears} 年`);
|
|
151
|
+
|
|
152
|
+
const ratingLabel: Record<IncomeRating, string> = {
|
|
153
|
+
excellent: "优秀", good: "良好", moderate: "一般", poor: "较差", no_dividend: "无股息",
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
return {
|
|
157
|
+
ticker,
|
|
158
|
+
name: raw.name ?? ticker,
|
|
159
|
+
currentPrice: raw.currentPrice ?? null,
|
|
160
|
+
dividendYield: raw.dividendYield ? Number(Number(raw.dividendYield).toFixed(2)) : null,
|
|
161
|
+
annualDividend: raw.annualDividend ?? null,
|
|
162
|
+
payoutRatio,
|
|
163
|
+
payoutStatus,
|
|
164
|
+
dividendGrowth5y: raw.dividendGrowth5y ? Number(Number(raw.dividendGrowth5y).toFixed(2)) : null,
|
|
165
|
+
consecutiveYears: raw.consecutiveYears ?? null,
|
|
166
|
+
exDividendDate: raw.exDividendDate ?? null,
|
|
167
|
+
paymentFrequency: raw.paymentFrequency ?? null,
|
|
168
|
+
safetyScore,
|
|
169
|
+
safetyFactors,
|
|
170
|
+
incomeRating,
|
|
171
|
+
dividendHistory: raw.dividendHistory ?? [],
|
|
172
|
+
summary: `${ticker}(${raw.name ?? ""}):${parts.join(",")}。评级:${ratingLabel[incomeRating]}`,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ── 格式化输出(Markdown 仪表盘)─────────────────────────
|
|
177
|
+
|
|
178
|
+
export function formatDividendMarkdown(analysis: DividendAnalysis): string {
|
|
179
|
+
if (analysis.incomeRating === "no_dividend") {
|
|
180
|
+
return `### 💰 股息分析 · ${analysis.ticker}\n\n该股票目前不派发股息。`;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const ratingEmoji: Record<IncomeRating, string> = {
|
|
184
|
+
excellent: "🏆", good: "✅", moderate: "⚠️", poor: "❌", no_dividend: "—",
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const payoutLabel: Record<string, string> = {
|
|
188
|
+
safe: "✅ 安全", moderate: "⚠️ 适中", high: "⚠️ 偏高", unsustainable: "❌ 不可持续", unknown: "暂缺",
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
let md = `### 💰 股息分析 · ${analysis.ticker}(${analysis.name})
|
|
192
|
+
|
|
193
|
+
| 指标 | 数值 |
|
|
194
|
+
|------|------|
|
|
195
|
+
| 股息收益率 | ${analysis.dividendYield ? `${analysis.dividendYield}%` : "暂缺"} |
|
|
196
|
+
| 年度每股股息 | ${analysis.annualDividend ? `$${analysis.annualDividend}` : "暂缺"} |
|
|
197
|
+
| 派息频率 | ${analysis.paymentFrequency ?? "暂缺"} |
|
|
198
|
+
| 除权日 | ${analysis.exDividendDate ?? "暂缺"} |
|
|
199
|
+
| 派息率 | ${analysis.payoutRatio ? `${analysis.payoutRatio}%(${payoutLabel[analysis.payoutStatus]})` : "暂缺"} |
|
|
200
|
+
| 5年股息增长 | ${analysis.dividendGrowth5y ? `${analysis.dividendGrowth5y > 0 ? "+" : ""}${analysis.dividendGrowth5y}%` : "暂缺"} |
|
|
201
|
+
| 连续增长年数 | ${analysis.consecutiveYears ?? "暂缺"} |
|
|
202
|
+
|
|
203
|
+
**安全评分:${analysis.safetyScore}/100 ${ratingEmoji[analysis.incomeRating]} 收入评级:${analysis.incomeRating.toUpperCase()}**
|
|
204
|
+
|
|
205
|
+
评分依据:
|
|
206
|
+
${analysis.safetyFactors.map((f) => `- ${f}`).join("\n")}
|
|
207
|
+
`;
|
|
208
|
+
|
|
209
|
+
if (analysis.dividendHistory.length > 0) {
|
|
210
|
+
md += `\n近年股息历史:\n`;
|
|
211
|
+
md += analysis.dividendHistory.slice(0, 5).map((h) => `- ${h.year}年:$${h.total}`).join("\n");
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return md;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ── 批量分析 ──────────────────────────────────────────────
|
|
218
|
+
|
|
219
|
+
export async function analyzeDividends(tickers: string[]): Promise<DividendAnalysis[]> {
|
|
220
|
+
const results: DividendAnalysis[] = [];
|
|
221
|
+
for (const ticker of tickers) {
|
|
222
|
+
results.push(await analyzeDividend(ticker));
|
|
223
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
224
|
+
}
|
|
225
|
+
return results;
|
|
226
|
+
}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* index.ts — Skill 主入口
|
|
3
|
+
*
|
|
4
|
+
* 支持命令:
|
|
5
|
+
* run() — 个股分析(主流程)
|
|
6
|
+
* runDividend() — 股息分析
|
|
7
|
+
* runRumorScan() — 传闻扫描
|
|
8
|
+
* runWatchlistAdd() — 添加自选股
|
|
9
|
+
* runWatchlistList() — 查看自选股
|
|
10
|
+
* runWatchlistCheck()— 检查提醒
|
|
11
|
+
* runWatchlistRemove()— 删除自选股
|
|
12
|
+
* runChartAnalysis() — K线图分析
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import ZAI from "z-ai-web-dev-sdk";
|
|
16
|
+
import { fetchMultipleStocks, fetchMarketOverview, fetchGlobalMacro } from "./dataFetcher";
|
|
17
|
+
import { analyzeMultipleStocks, analyzeChartImage } from "./analyzer";
|
|
18
|
+
import { analyzeDividends, formatDividendMarkdown } from "./dividend";
|
|
19
|
+
import { scanRumors, formatRumorMarkdown } from "./rumorScanner";
|
|
20
|
+
import {
|
|
21
|
+
addToWatchlist, removeFromWatchlist,
|
|
22
|
+
listWatchlist, checkAlerts,
|
|
23
|
+
formatWatchlistMarkdown, formatAlertsMarkdown,
|
|
24
|
+
} from "./watchlist";
|
|
25
|
+
import { SkillInput, StockInput, OutputFormat, AnalysisResult, PositionInfo, Verdict } from "./types";
|
|
26
|
+
|
|
27
|
+
// ── 输入解析 ──────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
function parseInput(raw: unknown): {
|
|
30
|
+
stocks: string[];
|
|
31
|
+
positions: Record<string, PositionInfo>;
|
|
32
|
+
outputFormat: OutputFormat;
|
|
33
|
+
mode: "full" | "quote";
|
|
34
|
+
includeMarketReview: boolean;
|
|
35
|
+
includeGlobalMacro: boolean;
|
|
36
|
+
includeDividend: boolean;
|
|
37
|
+
} {
|
|
38
|
+
const stocks: string[] = [];
|
|
39
|
+
const positions: Record<string, PositionInfo> = {};
|
|
40
|
+
let outputFormat: OutputFormat = "markdown";
|
|
41
|
+
let mode: "full" | "quote" = "full";
|
|
42
|
+
let includeMarketReview = false;
|
|
43
|
+
let includeGlobalMacro = true;
|
|
44
|
+
let includeDividend = false;
|
|
45
|
+
|
|
46
|
+
if (typeof raw === "string") {
|
|
47
|
+
raw.split(/[,,\s]+/).map((s) => s.trim().toUpperCase()).filter(Boolean).forEach((c) => stocks.push(c));
|
|
48
|
+
} else if (typeof raw === "object" && raw !== null) {
|
|
49
|
+
const input = raw as any;
|
|
50
|
+
const rawStocks: (string | StockInput)[] = input.stocks ?? (input.stock ? [input.stock] : []);
|
|
51
|
+
for (const s of rawStocks) {
|
|
52
|
+
if (typeof s === "string") stocks.push(s.trim().toUpperCase());
|
|
53
|
+
else if (s.code) {
|
|
54
|
+
const code = s.code.trim().toUpperCase();
|
|
55
|
+
stocks.push(code);
|
|
56
|
+
if (s.position) positions[code] = s.position;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
outputFormat = input.outputFormat ?? input.format ?? "markdown";
|
|
60
|
+
mode = input.mode ?? "full";
|
|
61
|
+
includeMarketReview = input.includeMarketReview ?? false;
|
|
62
|
+
includeGlobalMacro = input.includeGlobalMacro ?? true;
|
|
63
|
+
includeDividend = input.includeDividend ?? false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return { stocks, positions, outputFormat, mode, includeMarketReview, includeGlobalMacro, includeDividend };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function log(msg: string) { console.log(`[${new Date().toISOString()}] ${msg}`); }
|
|
70
|
+
|
|
71
|
+
// ── 报告组装 ──────────────────────────────────────────────
|
|
72
|
+
|
|
73
|
+
function buildFullReport(
|
|
74
|
+
results: AnalysisResult[],
|
|
75
|
+
globalMacro?: string,
|
|
76
|
+
marketOverview?: string
|
|
77
|
+
): string {
|
|
78
|
+
const date = new Date().toLocaleDateString("zh-CN");
|
|
79
|
+
const buy = results.filter((r) => ["买入", "强烈买入"].includes(r.verdict)).length;
|
|
80
|
+
const watch = results.filter((r) => r.verdict === "观望").length;
|
|
81
|
+
const sell = results.filter((r) => r.verdict === "卖出").length;
|
|
82
|
+
|
|
83
|
+
let output = `# 📈 股票智能分析报告
|
|
84
|
+
**生成时间:** ${date} | **分析 ${results.length} 只** | 🟢买入/强烈买入 ${buy} 🟡观望 ${watch} 🔴卖出 ${sell}
|
|
85
|
+
|
|
86
|
+
`;
|
|
87
|
+
if (globalMacro) output += `---\n\n## 🌍 全球宏观速览\n\n${globalMacro}\n\n`;
|
|
88
|
+
if (marketOverview) output += `---\n\n## 🎯 大盘复盘\n\n${marketOverview}\n\n`;
|
|
89
|
+
output += `---\n\n## 📊 个股决策仪表盘\n\n`;
|
|
90
|
+
output += results.map((r) => {
|
|
91
|
+
const warn = r.warnings.length > 0 ? `\n> ⚠️ **预警:** ${r.warnings.join(" | ")}\n` : "";
|
|
92
|
+
return `${warn}\n${r.analysis}\n\n---\n`;
|
|
93
|
+
}).join("\n");
|
|
94
|
+
|
|
95
|
+
return output;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ── 调用 pdf/docx skill ───────────────────────────────────
|
|
99
|
+
|
|
100
|
+
async function exportToFormat(content: string, format: "pdf" | "word"): Promise<string> {
|
|
101
|
+
const zai = await ZAI.create();
|
|
102
|
+
const isPDF = format === "pdf";
|
|
103
|
+
const completion = await zai.chat.completions.create({
|
|
104
|
+
messages: [{
|
|
105
|
+
role: "user",
|
|
106
|
+
content: isPDF
|
|
107
|
+
? `请创建一份 PDF 文档,内容是以下股票研报。要求:A4页面,中文字体,每只股票独立分页,结论用颜色标注,末尾附免责声明。\n\n${content}`
|
|
108
|
+
: `请创建一份 Word (.docx) 文档,内容是以下股票研报。要求:保留标题层级,每只股票独立分页,作战计划用表格,末尾附免责声明。\n\n${content}`,
|
|
109
|
+
}],
|
|
110
|
+
thinking: { type: "disabled" },
|
|
111
|
+
});
|
|
112
|
+
return completion.choices[0]?.message?.content ?? `${isPDF ? "PDF" : "Word"} 生成完成`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ══════════════════════════════════════════════════════════
|
|
116
|
+
// 主流程:个股分析
|
|
117
|
+
// ══════════════════════════════════════════════════════════
|
|
118
|
+
|
|
119
|
+
export async function run(rawInput: unknown): Promise<{
|
|
120
|
+
success: boolean; format: OutputFormat; content: string;
|
|
121
|
+
summary: { total: number; buy: number; watch: number; sell: number; errors: number };
|
|
122
|
+
error?: string;
|
|
123
|
+
}> {
|
|
124
|
+
let parsed: ReturnType<typeof parseInput>;
|
|
125
|
+
try { parsed = parseInput(rawInput); }
|
|
126
|
+
catch (err: any) {
|
|
127
|
+
return { success: false, format: "markdown", content: `❌ 输入解析失败:${err.message}`,
|
|
128
|
+
summary: { total: 0, buy: 0, watch: 0, sell: 0, errors: 0 }, error: err.message };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const { stocks, positions, outputFormat, mode, includeMarketReview, includeGlobalMacro, includeDividend } = parsed;
|
|
132
|
+
if (!stocks.length) return { success: false, format: outputFormat, content: "❌ 未提供股票代码",
|
|
133
|
+
summary: { total: 0, buy: 0, watch: 0, sell: 0, errors: 0 } };
|
|
134
|
+
|
|
135
|
+
log(`分析 ${stocks.length} 只:${stocks.join(", ")} | 格式:${outputFormat}`);
|
|
136
|
+
|
|
137
|
+
// 并行获取宏观数据
|
|
138
|
+
let globalMacro: string | undefined;
|
|
139
|
+
let marketOverview: string | undefined;
|
|
140
|
+
await Promise.all([
|
|
141
|
+
includeGlobalMacro ? fetchGlobalMacro().then((r) => { globalMacro = r; }) : Promise.resolve(),
|
|
142
|
+
includeMarketReview ? fetchMarketOverview().then((r) => { marketOverview = r; }) : Promise.resolve(),
|
|
143
|
+
]);
|
|
144
|
+
|
|
145
|
+
// 抓取个股数据
|
|
146
|
+
let stockDataList;
|
|
147
|
+
try {
|
|
148
|
+
stockDataList = await fetchMultipleStocks(stocks, mode);
|
|
149
|
+
log(`数据完成:${stockDataList.filter((d) => !d.error).length}/${stocks.length}`);
|
|
150
|
+
} catch (err: any) {
|
|
151
|
+
return { success: false, format: outputFormat, content: `❌ 数据抓取失败:${err.message}`,
|
|
152
|
+
summary: { total: stocks.length, buy: 0, watch: 0, sell: 0, errors: stocks.length }, error: err.message };
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// LLM 分析
|
|
156
|
+
const analysisResults = await analyzeMultipleStocks(stockDataList, outputFormat, positions, includeDividend);
|
|
157
|
+
|
|
158
|
+
// 检查自选股信号变化(如有)
|
|
159
|
+
const signals: Record<string, Verdict> = {};
|
|
160
|
+
for (const r of analysisResults) signals[r.code] = r.verdict;
|
|
161
|
+
await checkAlerts(signals).catch(() => {}); // 静默更新,不阻塞主流程
|
|
162
|
+
|
|
163
|
+
// 生成报告
|
|
164
|
+
let content: string;
|
|
165
|
+
try {
|
|
166
|
+
const markdown = buildFullReport(analysisResults, globalMacro, marketOverview);
|
|
167
|
+
if (outputFormat === "pdf") content = await exportToFormat(markdown, "pdf");
|
|
168
|
+
else if (outputFormat === "word") content = await exportToFormat(markdown, "word");
|
|
169
|
+
else content = markdown;
|
|
170
|
+
} catch (err: any) {
|
|
171
|
+
return { success: false, format: outputFormat, content: `❌ 报告生成失败:${err.message}`,
|
|
172
|
+
summary: { total: stocks.length, buy: 0, watch: 0, sell: 0, errors: stocks.length }, error: err.message };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const summary = {
|
|
176
|
+
total: analysisResults.length,
|
|
177
|
+
buy: analysisResults.filter((r) => ["买入", "强烈买入"].includes(r.verdict)).length,
|
|
178
|
+
watch: analysisResults.filter((r) => r.verdict === "观望").length,
|
|
179
|
+
sell: analysisResults.filter((r) => r.verdict === "卖出").length,
|
|
180
|
+
errors: stockDataList.filter((d) => d.error).length,
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
log(`完成 ✅ 买入:${summary.buy} 观望:${summary.watch} 卖出:${summary.sell}`);
|
|
184
|
+
return { success: true, format: outputFormat, content, summary };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ══════════════════════════════════════════════════════════
|
|
188
|
+
// 股息分析
|
|
189
|
+
// ══════════════════════════════════════════════════════════
|
|
190
|
+
|
|
191
|
+
export async function runDividend(tickers: string | string[]): Promise<string> {
|
|
192
|
+
const codes = Array.isArray(tickers) ? tickers : tickers.split(/[,,\s]+/).filter(Boolean);
|
|
193
|
+
log(`股息分析:${codes.join(", ")}`);
|
|
194
|
+
const results = await analyzeDividends(codes.map((c) => c.toUpperCase()));
|
|
195
|
+
|
|
196
|
+
let output = `# 💰 股息分析报告\n**生成时间:** ${new Date().toLocaleDateString("zh-CN")}\n\n---\n\n`;
|
|
197
|
+
for (const r of results) output += formatDividendMarkdown(r) + "\n\n---\n\n";
|
|
198
|
+
output += "_以上数据仅供参考,不构成投资建议。_";
|
|
199
|
+
return output;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// ══════════════════════════════════════════════════════════
|
|
203
|
+
// 传闻扫描
|
|
204
|
+
// ══════════════════════════════════════════════════════════
|
|
205
|
+
|
|
206
|
+
export async function runRumorScan(): Promise<string> {
|
|
207
|
+
log("开始传闻扫描...");
|
|
208
|
+
const result = await scanRumors();
|
|
209
|
+
return formatRumorMarkdown(result);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// ══════════════════════════════════════════════════════════
|
|
213
|
+
// 自选股管理
|
|
214
|
+
// ══════════════════════════════════════════════════════════
|
|
215
|
+
|
|
216
|
+
export async function runWatchlistAdd(
|
|
217
|
+
ticker: string,
|
|
218
|
+
opts: { targetPrice?: number; stopPrice?: number; alertOnSignal?: boolean; notes?: string } = {}
|
|
219
|
+
): Promise<string> {
|
|
220
|
+
const result = await addToWatchlist(ticker, opts);
|
|
221
|
+
return result.message;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export async function runWatchlistRemove(ticker: string): Promise<string> {
|
|
225
|
+
const result = await removeFromWatchlist(ticker);
|
|
226
|
+
return result.message;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export async function runWatchlistList(): Promise<string> {
|
|
230
|
+
const data = await listWatchlist();
|
|
231
|
+
return formatWatchlistMarkdown(data);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export async function runWatchlistCheck(): Promise<string> {
|
|
235
|
+
const result = await checkAlerts();
|
|
236
|
+
return formatAlertsMarkdown(result);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// ══════════════════════════════════════════════════════════
|
|
240
|
+
// K线图分析
|
|
241
|
+
// ══════════════════════════════════════════════════════════
|
|
242
|
+
|
|
243
|
+
export async function runChartAnalysis(
|
|
244
|
+
stockCode: string,
|
|
245
|
+
imageUrlOrBase64: string,
|
|
246
|
+
isBase64 = false
|
|
247
|
+
): Promise<{ success: boolean; content: string }> {
|
|
248
|
+
try {
|
|
249
|
+
const result = await analyzeChartImage(imageUrlOrBase64, stockCode, isBase64);
|
|
250
|
+
return { success: true, content: result };
|
|
251
|
+
} catch (err: any) {
|
|
252
|
+
return { success: false, content: `K线图分析失败:${err.message}` };
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// ══════════════════════════════════════════════════════════
|
|
257
|
+
// CLI 调试
|
|
258
|
+
// ══════════════════════════════════════════════════════════
|
|
259
|
+
|
|
260
|
+
async function cli() {
|
|
261
|
+
const args = process.argv.slice(2);
|
|
262
|
+
const cmd = args[0];
|
|
263
|
+
|
|
264
|
+
if (!cmd || cmd === "--help") {
|
|
265
|
+
console.log(`
|
|
266
|
+
Stock Analysis Skill CLI
|
|
267
|
+
|
|
268
|
+
命令:
|
|
269
|
+
analyze <代码,...> [markdown|pdf|word] [--market-review] [--dividend]
|
|
270
|
+
dividend <代码,...>
|
|
271
|
+
rumors
|
|
272
|
+
watch add <代码> [--target 价格] [--stop 价格] [--signal]
|
|
273
|
+
watch remove <代码>
|
|
274
|
+
watch list
|
|
275
|
+
watch check
|
|
276
|
+
|
|
277
|
+
示例:
|
|
278
|
+
ts-node src/index.ts analyze 600519,00700.HK,AAPL
|
|
279
|
+
ts-node src/index.ts analyze AAPL --dividend
|
|
280
|
+
ts-node src/index.ts dividend JNJ PG KO
|
|
281
|
+
ts-node src/index.ts rumors
|
|
282
|
+
ts-node src/index.ts watch add AAPL --target 200 --stop 150
|
|
283
|
+
ts-node src/index.ts watch list
|
|
284
|
+
`);
|
|
285
|
+
process.exit(0);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (cmd === "analyze") {
|
|
289
|
+
const codes = (args[1] ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
290
|
+
const format = (["markdown", "pdf", "word"].find((f) => args.includes(f)) as OutputFormat) ?? "markdown";
|
|
291
|
+
const includeMarketReview = args.includes("--market-review");
|
|
292
|
+
const includeDividend = args.includes("--dividend");
|
|
293
|
+
const result = await run({ stocks: codes, outputFormat: format, includeMarketReview, includeDividend });
|
|
294
|
+
console.log(result.content);
|
|
295
|
+
console.log("\n📊 汇总:", result.summary);
|
|
296
|
+
|
|
297
|
+
} else if (cmd === "dividend") {
|
|
298
|
+
const codes = args.slice(1).filter((a) => !a.startsWith("--"));
|
|
299
|
+
console.log(await runDividend(codes));
|
|
300
|
+
|
|
301
|
+
} else if (cmd === "rumors") {
|
|
302
|
+
console.log(await runRumorScan());
|
|
303
|
+
|
|
304
|
+
} else if (cmd === "watch") {
|
|
305
|
+
const sub = args[1];
|
|
306
|
+
if (sub === "add") {
|
|
307
|
+
const ticker = args[2];
|
|
308
|
+
const targetIdx = args.indexOf("--target");
|
|
309
|
+
const stopIdx = args.indexOf("--stop");
|
|
310
|
+
console.log(await runWatchlistAdd(ticker, {
|
|
311
|
+
targetPrice: targetIdx >= 0 ? Number(args[targetIdx + 1]) : undefined,
|
|
312
|
+
stopPrice: stopIdx >= 0 ? Number(args[stopIdx + 1]) : undefined,
|
|
313
|
+
alertOnSignal: args.includes("--signal"),
|
|
314
|
+
}));
|
|
315
|
+
} else if (sub === "remove") {
|
|
316
|
+
console.log(await runWatchlistRemove(args[2]));
|
|
317
|
+
} else if (sub === "list") {
|
|
318
|
+
console.log(await runWatchlistList());
|
|
319
|
+
} else if (sub === "check") {
|
|
320
|
+
console.log(await runWatchlistCheck());
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (require.main === module) {
|
|
326
|
+
cli().catch((err) => { console.error(err); process.exit(1); });
|
|
327
|
+
}
|