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,352 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Timeline Tracker for Storyboard Manager
|
|
4
|
+
|
|
5
|
+
This script analyzes markdown files in a storyboard project to extract and organize
|
|
6
|
+
timeline events, helping writers maintain chronological consistency.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import re
|
|
11
|
+
import json
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import List, Dict, Tuple, Optional
|
|
15
|
+
from datetime import datetime, timedelta
|
|
16
|
+
from collections import defaultdict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TimelineEvent:
|
|
20
|
+
"""Represents a single event in the story timeline"""
|
|
21
|
+
|
|
22
|
+
def __init__(self, content: str, location: str, chapter: str = None,
|
|
23
|
+
timepoint: str = None, characters: List[str] = None):
|
|
24
|
+
self.content = content
|
|
25
|
+
self.location = location # File path where event was found
|
|
26
|
+
self.chapter = chapter
|
|
27
|
+
self.timepoint = timepoint # Relative time (e.g., "Day 1", "3 weeks later")
|
|
28
|
+
self.characters = characters or []
|
|
29
|
+
|
|
30
|
+
def __repr__(self):
|
|
31
|
+
return f"TimelineEvent({self.timepoint}: {self.content[:50]}...)"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class TimelineTracker:
|
|
35
|
+
"""Main timeline tracking and analysis class"""
|
|
36
|
+
|
|
37
|
+
# Patterns to detect time markers in text
|
|
38
|
+
TIME_PATTERNS = [
|
|
39
|
+
r'(?:Day|Night)\s+(\d+)', # Day 1, Night 3
|
|
40
|
+
r'(\d+)\s+(?:days?|weeks?|months?|years?)\s+(?:later|ago|after|before)',
|
|
41
|
+
r'(?:Morning|Afternoon|Evening|Night)\s+of\s+(?:Day\s+)?(\d+)',
|
|
42
|
+
r'Chapter\s+(\d+)', # Chapter markers
|
|
43
|
+
r'\*\*(?:Timeline|Time|When):\*\*\s*(.+?)(?:\n|$)', # Explicit timeline markers
|
|
44
|
+
r'\*\*Date:\*\*\s*(.+?)(?:\n|$)',
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
# Patterns to detect character mentions
|
|
48
|
+
CHARACTER_PATTERNS = [
|
|
49
|
+
r'\*\*Characters?:\*\*\s*(.+?)(?:\n|$)',
|
|
50
|
+
r'\*\*(?:POV|Perspective):\*\*\s*(.+?)(?:\n|$)',
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
def __init__(self, project_root: str):
|
|
54
|
+
self.project_root = Path(project_root)
|
|
55
|
+
self.events: List[TimelineEvent] = []
|
|
56
|
+
self.characters: set = set()
|
|
57
|
+
|
|
58
|
+
def scan_directory(self, directory: Path) -> List[Path]:
|
|
59
|
+
"""Recursively find all markdown files in directory"""
|
|
60
|
+
md_files = []
|
|
61
|
+
if not directory.exists():
|
|
62
|
+
return md_files
|
|
63
|
+
|
|
64
|
+
for item in directory.iterdir():
|
|
65
|
+
if item.is_file() and item.suffix == '.md':
|
|
66
|
+
md_files.append(item)
|
|
67
|
+
elif item.is_dir() and not item.name.startswith('.'):
|
|
68
|
+
md_files.extend(self.scan_directory(item))
|
|
69
|
+
|
|
70
|
+
return md_files
|
|
71
|
+
|
|
72
|
+
def extract_characters_from_file(self, file_path: Path) -> List[str]:
|
|
73
|
+
"""Extract character names from character profile files"""
|
|
74
|
+
try:
|
|
75
|
+
content = file_path.read_text(encoding='utf-8')
|
|
76
|
+
|
|
77
|
+
# Look for character name in title (# Character Name)
|
|
78
|
+
name_match = re.search(r'^#\s+(.+?)$', content, re.MULTILINE)
|
|
79
|
+
if name_match:
|
|
80
|
+
return [name_match.group(1).strip()]
|
|
81
|
+
|
|
82
|
+
# Look for explicit name field
|
|
83
|
+
name_match = re.search(r'\*\*Name:\*\*\s*(.+?)(?:\n|$)', content)
|
|
84
|
+
if name_match:
|
|
85
|
+
return [name_match.group(1).strip()]
|
|
86
|
+
|
|
87
|
+
except Exception as e:
|
|
88
|
+
print(f"Warning: Could not read {file_path}: {e}", file=sys.stderr)
|
|
89
|
+
|
|
90
|
+
return []
|
|
91
|
+
|
|
92
|
+
def extract_timeline_markers(self, content: str) -> List[Tuple[str, int]]:
|
|
93
|
+
"""Extract time markers from content, return list of (timepoint, position)"""
|
|
94
|
+
markers = []
|
|
95
|
+
|
|
96
|
+
for pattern in self.TIME_PATTERNS:
|
|
97
|
+
for match in re.finditer(pattern, content, re.IGNORECASE):
|
|
98
|
+
timepoint = match.group(1) if match.lastindex else match.group(0)
|
|
99
|
+
markers.append((timepoint.strip(), match.start()))
|
|
100
|
+
|
|
101
|
+
return sorted(markers, key=lambda x: x[1])
|
|
102
|
+
|
|
103
|
+
def extract_character_mentions(self, content: str) -> List[str]:
|
|
104
|
+
"""Extract character names from explicit character markers"""
|
|
105
|
+
characters = []
|
|
106
|
+
|
|
107
|
+
for pattern in self.CHARACTER_PATTERNS:
|
|
108
|
+
matches = re.finditer(pattern, content, re.IGNORECASE)
|
|
109
|
+
for match in matches:
|
|
110
|
+
char_text = match.group(1)
|
|
111
|
+
# Split by commas, 'and', '&'
|
|
112
|
+
names = re.split(r'[,&]|\sand\s', char_text)
|
|
113
|
+
characters.extend([name.strip() for name in names if name.strip()])
|
|
114
|
+
|
|
115
|
+
return characters
|
|
116
|
+
|
|
117
|
+
def find_character_references(self, content: str, known_characters: set) -> List[str]:
|
|
118
|
+
"""Find mentions of known characters in content"""
|
|
119
|
+
found = []
|
|
120
|
+
for character in known_characters:
|
|
121
|
+
# Simple word boundary check
|
|
122
|
+
if re.search(r'\b' + re.escape(character) + r'\b', content, re.IGNORECASE):
|
|
123
|
+
found.append(character)
|
|
124
|
+
return found
|
|
125
|
+
|
|
126
|
+
def parse_chapter_file(self, file_path: Path) -> List[TimelineEvent]:
|
|
127
|
+
"""Parse a chapter/scene file for timeline events"""
|
|
128
|
+
events = []
|
|
129
|
+
|
|
130
|
+
try:
|
|
131
|
+
content = file_path.read_text(encoding='utf-8')
|
|
132
|
+
|
|
133
|
+
# Get chapter number/name from filename or title
|
|
134
|
+
chapter = file_path.stem
|
|
135
|
+
title_match = re.search(r'^#\s+(.+?)$', content, re.MULTILINE)
|
|
136
|
+
if title_match:
|
|
137
|
+
chapter = title_match.group(1).strip()
|
|
138
|
+
|
|
139
|
+
# Extract explicit character mentions
|
|
140
|
+
explicit_chars = self.extract_character_mentions(content)
|
|
141
|
+
|
|
142
|
+
# Find timeline markers
|
|
143
|
+
markers = self.extract_timeline_markers(content)
|
|
144
|
+
|
|
145
|
+
# Split content into sections based on markers
|
|
146
|
+
if markers:
|
|
147
|
+
sections = []
|
|
148
|
+
for i, (timepoint, pos) in enumerate(markers):
|
|
149
|
+
start_pos = pos
|
|
150
|
+
end_pos = markers[i + 1][1] if i + 1 < len(markers) else len(content)
|
|
151
|
+
section_content = content[start_pos:end_pos]
|
|
152
|
+
|
|
153
|
+
# Find characters in this section
|
|
154
|
+
section_chars = explicit_chars.copy()
|
|
155
|
+
section_chars.extend(self.find_character_references(
|
|
156
|
+
section_content, self.characters))
|
|
157
|
+
|
|
158
|
+
event = TimelineEvent(
|
|
159
|
+
content=section_content[:500], # First 500 chars as preview
|
|
160
|
+
location=str(file_path.relative_to(self.project_root)),
|
|
161
|
+
chapter=chapter,
|
|
162
|
+
timepoint=timepoint,
|
|
163
|
+
characters=list(set(section_chars))
|
|
164
|
+
)
|
|
165
|
+
events.append(event)
|
|
166
|
+
else:
|
|
167
|
+
# No explicit markers, treat whole file as one event
|
|
168
|
+
all_chars = explicit_chars.copy()
|
|
169
|
+
all_chars.extend(self.find_character_references(content, self.characters))
|
|
170
|
+
|
|
171
|
+
event = TimelineEvent(
|
|
172
|
+
content=content[:500],
|
|
173
|
+
location=str(file_path.relative_to(self.project_root)),
|
|
174
|
+
chapter=chapter,
|
|
175
|
+
timepoint=None,
|
|
176
|
+
characters=list(set(all_chars))
|
|
177
|
+
)
|
|
178
|
+
events.append(event)
|
|
179
|
+
|
|
180
|
+
except Exception as e:
|
|
181
|
+
print(f"Warning: Error parsing {file_path}: {e}", file=sys.stderr)
|
|
182
|
+
|
|
183
|
+
return events
|
|
184
|
+
|
|
185
|
+
def analyze_project(self) -> Dict:
|
|
186
|
+
"""Analyze entire project and build timeline"""
|
|
187
|
+
|
|
188
|
+
# First, find all characters
|
|
189
|
+
char_dirs = ['characters', 'Characters', 'cast']
|
|
190
|
+
for dirname in char_dirs:
|
|
191
|
+
char_dir = self.project_root / dirname
|
|
192
|
+
if char_dir.exists():
|
|
193
|
+
for char_file in self.scan_directory(char_dir):
|
|
194
|
+
names = self.extract_characters_from_file(char_file)
|
|
195
|
+
self.characters.update(names)
|
|
196
|
+
|
|
197
|
+
# Then scan chapters/scenes
|
|
198
|
+
content_dirs = ['chapters', 'Chapters', 'scenes', 'Scenes', 'story']
|
|
199
|
+
for dirname in content_dirs:
|
|
200
|
+
content_dir = self.project_root / dirname
|
|
201
|
+
if content_dir.exists():
|
|
202
|
+
for content_file in self.scan_directory(content_dir):
|
|
203
|
+
events = self.parse_chapter_file(content_file)
|
|
204
|
+
self.events.extend(events)
|
|
205
|
+
|
|
206
|
+
# Build analysis
|
|
207
|
+
analysis = {
|
|
208
|
+
'total_events': len(self.events),
|
|
209
|
+
'total_characters': len(self.characters),
|
|
210
|
+
'characters': sorted(list(self.characters)),
|
|
211
|
+
'events_by_timepoint': self._group_events_by_time(),
|
|
212
|
+
'events_by_character': self._group_events_by_character(),
|
|
213
|
+
'events_by_chapter': self._group_events_by_chapter(),
|
|
214
|
+
'timeline': self._build_timeline(),
|
|
215
|
+
'warnings': self._check_consistency()
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return analysis
|
|
219
|
+
|
|
220
|
+
def _group_events_by_time(self) -> Dict[str, List[Dict]]:
|
|
221
|
+
"""Group events by their timepoint"""
|
|
222
|
+
grouped = defaultdict(list)
|
|
223
|
+
|
|
224
|
+
for event in self.events:
|
|
225
|
+
timepoint = event.timepoint or "Unspecified"
|
|
226
|
+
grouped[timepoint].append({
|
|
227
|
+
'location': event.location,
|
|
228
|
+
'chapter': event.chapter,
|
|
229
|
+
'characters': event.characters,
|
|
230
|
+
'preview': event.content[:200]
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
return dict(grouped)
|
|
234
|
+
|
|
235
|
+
def _group_events_by_character(self) -> Dict[str, List[Dict]]:
|
|
236
|
+
"""Group events by character appearance"""
|
|
237
|
+
grouped = defaultdict(list)
|
|
238
|
+
|
|
239
|
+
for event in self.events:
|
|
240
|
+
for character in event.characters:
|
|
241
|
+
grouped[character].append({
|
|
242
|
+
'location': event.location,
|
|
243
|
+
'chapter': event.chapter,
|
|
244
|
+
'timepoint': event.timepoint,
|
|
245
|
+
'preview': event.content[:200]
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
return dict(grouped)
|
|
249
|
+
|
|
250
|
+
def _group_events_by_chapter(self) -> Dict[str, List[Dict]]:
|
|
251
|
+
"""Group events by chapter"""
|
|
252
|
+
grouped = defaultdict(list)
|
|
253
|
+
|
|
254
|
+
for event in self.events:
|
|
255
|
+
chapter = event.chapter or "Unknown"
|
|
256
|
+
grouped[chapter].append({
|
|
257
|
+
'location': event.location,
|
|
258
|
+
'timepoint': event.timepoint,
|
|
259
|
+
'characters': event.characters,
|
|
260
|
+
'preview': event.content[:200]
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
return dict(grouped)
|
|
264
|
+
|
|
265
|
+
def _build_timeline(self) -> List[Dict]:
|
|
266
|
+
"""Build chronological timeline of events"""
|
|
267
|
+
# Sort events by timepoint (this is simplified, real implementation
|
|
268
|
+
# would need more sophisticated time parsing)
|
|
269
|
+
timeline = []
|
|
270
|
+
|
|
271
|
+
for event in self.events:
|
|
272
|
+
timeline.append({
|
|
273
|
+
'timepoint': event.timepoint or "Unknown",
|
|
274
|
+
'chapter': event.chapter,
|
|
275
|
+
'location': event.location,
|
|
276
|
+
'characters': event.characters,
|
|
277
|
+
'preview': event.content[:200]
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
return timeline
|
|
281
|
+
|
|
282
|
+
def _check_consistency(self) -> List[str]:
|
|
283
|
+
"""Check for potential timeline inconsistencies"""
|
|
284
|
+
warnings = []
|
|
285
|
+
|
|
286
|
+
# Check for events without time markers
|
|
287
|
+
unmarked_events = [e for e in self.events if not e.timepoint]
|
|
288
|
+
if unmarked_events:
|
|
289
|
+
warnings.append(
|
|
290
|
+
f"Found {len(unmarked_events)} events without timeline markers"
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# Check for characters appearing in timeline without character files
|
|
294
|
+
mentioned_chars = set()
|
|
295
|
+
for event in self.events:
|
|
296
|
+
mentioned_chars.update(event.characters)
|
|
297
|
+
|
|
298
|
+
undefined_chars = mentioned_chars - self.characters
|
|
299
|
+
if undefined_chars:
|
|
300
|
+
warnings.append(
|
|
301
|
+
f"Characters mentioned but not defined: {', '.join(sorted(undefined_chars))}"
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
return warnings
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def main():
|
|
308
|
+
"""Main entry point for timeline tracker"""
|
|
309
|
+
|
|
310
|
+
if len(sys.argv) < 2:
|
|
311
|
+
print("Usage: timeline_tracker.py <project_directory> [--output json|markdown]")
|
|
312
|
+
sys.exit(1)
|
|
313
|
+
|
|
314
|
+
project_dir = sys.argv[1]
|
|
315
|
+
output_format = 'markdown'
|
|
316
|
+
|
|
317
|
+
if len(sys.argv) > 2 and sys.argv[2] == '--output':
|
|
318
|
+
output_format = sys.argv[3] if len(sys.argv) > 3 else 'markdown'
|
|
319
|
+
|
|
320
|
+
tracker = TimelineTracker(project_dir)
|
|
321
|
+
analysis = tracker.analyze_project()
|
|
322
|
+
|
|
323
|
+
if output_format == 'json':
|
|
324
|
+
print(json.dumps(analysis, indent=2))
|
|
325
|
+
else:
|
|
326
|
+
# Markdown output
|
|
327
|
+
print("# Timeline Analysis\n")
|
|
328
|
+
print(f"**Total Events:** {analysis['total_events']}")
|
|
329
|
+
print(f"**Total Characters:** {analysis['total_characters']}\n")
|
|
330
|
+
|
|
331
|
+
print("## Characters")
|
|
332
|
+
for char in analysis['characters']:
|
|
333
|
+
appearances = len(analysis['events_by_character'].get(char, []))
|
|
334
|
+
print(f"- {char} ({appearances} appearances)")
|
|
335
|
+
|
|
336
|
+
print("\n## Timeline")
|
|
337
|
+
for event in analysis['timeline']:
|
|
338
|
+
print(f"\n### {event['timepoint']} - {event['chapter']}")
|
|
339
|
+
print(f"**Location:** {event['location']}")
|
|
340
|
+
if event['characters']:
|
|
341
|
+
print(f"**Characters:** {', '.join(event['characters'])}")
|
|
342
|
+
print(f"\n{event['preview']}...\n")
|
|
343
|
+
print("---")
|
|
344
|
+
|
|
345
|
+
if analysis['warnings']:
|
|
346
|
+
print("\n## Warnings")
|
|
347
|
+
for warning in analysis['warnings']:
|
|
348
|
+
print(f"- ⚠️ {warning}")
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
if __name__ == '__main__':
|
|
352
|
+
main()
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"""
|
|
2
|
+
skills/system_skill.py - 系统操作技能
|
|
3
|
+
========================================
|
|
4
|
+
提供系统信息查询、进程管理、环境操作等功能。
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import asyncio
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
import subprocess
|
|
12
|
+
import platform
|
|
13
|
+
import shutil
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from typing import Optional, List, Dict
|
|
16
|
+
|
|
17
|
+
from core.logger import get_logger
|
|
18
|
+
from skills.base import Skill, SkillResult, SkillParameter
|
|
19
|
+
|
|
20
|
+
logger = get_logger("myagent.skills.system")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SystemInfoSkill(Skill):
|
|
24
|
+
"""获取系统信息"""
|
|
25
|
+
name = "system_info"
|
|
26
|
+
description = "获取当前系统的详细信息(操作系统、CPU、内存、磁盘等)"
|
|
27
|
+
category = "system"
|
|
28
|
+
parameters = []
|
|
29
|
+
|
|
30
|
+
async def execute(self, **kwargs) -> SkillResult:
|
|
31
|
+
try:
|
|
32
|
+
import psutil
|
|
33
|
+
|
|
34
|
+
info = {
|
|
35
|
+
"platform": platform.platform(),
|
|
36
|
+
"system": platform.system(),
|
|
37
|
+
"release": platform.release(),
|
|
38
|
+
"version": platform.version(),
|
|
39
|
+
"machine": platform.machine(),
|
|
40
|
+
"processor": platform.processor(),
|
|
41
|
+
"hostname": platform.node(),
|
|
42
|
+
"python_version": sys.version,
|
|
43
|
+
"cpu_count": psutil.cpu_count(),
|
|
44
|
+
"cpu_percent": psutil.cpu_percent(interval=1),
|
|
45
|
+
"memory": {
|
|
46
|
+
"total_gb": round(psutil.virtual_memory().total / (1024**3), 2),
|
|
47
|
+
"available_gb": round(psutil.virtual_memory().available / (1024**3), 2),
|
|
48
|
+
"percent": psutil.virtual_memory().percent,
|
|
49
|
+
},
|
|
50
|
+
"disk": {
|
|
51
|
+
"total_gb": round(psutil.disk_usage("/").total / (1024**3), 2),
|
|
52
|
+
"free_gb": round(psutil.disk_usage("/").free / (1024**3), 2),
|
|
53
|
+
"percent": psutil.disk_usage("/").percent,
|
|
54
|
+
},
|
|
55
|
+
"current_user": os.getlogin(),
|
|
56
|
+
"cwd": os.getcwd(),
|
|
57
|
+
"home": str(os.path.expanduser("~")),
|
|
58
|
+
"pid": os.getpid(),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# 环境变量(常用)
|
|
62
|
+
important_env = [
|
|
63
|
+
"PATH", "HOME", "USER", "SHELL",
|
|
64
|
+
"LANG", "TERM", "EDITOR",
|
|
65
|
+
"PYTHONPATH", "VIRTUAL_ENV", "CONDA_DEFAULT_ENV",
|
|
66
|
+
]
|
|
67
|
+
env_vars = {}
|
|
68
|
+
for key in important_env:
|
|
69
|
+
val = os.environ.get(key)
|
|
70
|
+
if val:
|
|
71
|
+
env_vars[key] = val
|
|
72
|
+
info["env"] = env_vars
|
|
73
|
+
|
|
74
|
+
return SkillResult(
|
|
75
|
+
success=True,
|
|
76
|
+
data=info,
|
|
77
|
+
message=f"系统: {platform.system()} {platform.release()} | "
|
|
78
|
+
f"CPU: {info['cpu_count']}核 | "
|
|
79
|
+
f"内存: {info['memory']['available_gb']}GB可用",
|
|
80
|
+
)
|
|
81
|
+
except ImportError:
|
|
82
|
+
# 回退: 不用 psutil
|
|
83
|
+
info = {
|
|
84
|
+
"platform": platform.platform(),
|
|
85
|
+
"system": platform.system(),
|
|
86
|
+
"python_version": sys.version,
|
|
87
|
+
"cwd": os.getcwd(),
|
|
88
|
+
"pid": os.getpid(),
|
|
89
|
+
}
|
|
90
|
+
return SkillResult(
|
|
91
|
+
success=True,
|
|
92
|
+
data=info,
|
|
93
|
+
message="psutil 未安装,仅返回基本信息。建议: pip install psutil",
|
|
94
|
+
)
|
|
95
|
+
except Exception as e:
|
|
96
|
+
return SkillResult(success=False, error=str(e))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class ProcessListSkill(Skill):
|
|
100
|
+
"""列出进程"""
|
|
101
|
+
name = "process_list"
|
|
102
|
+
description = "列出系统当前运行的进程"
|
|
103
|
+
category = "system"
|
|
104
|
+
parameters = [
|
|
105
|
+
SkillParameter("filter", "string", "进程名过滤", required=False, default=""),
|
|
106
|
+
SkillParameter("limit", "integer", "返回数量限制", required=False, default=20),
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
async def execute(self, filter: str = "", limit: int = 20, **kwargs) -> SkillResult:
|
|
110
|
+
try:
|
|
111
|
+
import psutil
|
|
112
|
+
|
|
113
|
+
processes = []
|
|
114
|
+
for proc in psutil.process_iter(["pid", "name", "cpu_percent", "memory_percent", "status"]):
|
|
115
|
+
try:
|
|
116
|
+
info = proc.info
|
|
117
|
+
if filter and filter.lower() not in info["name"].lower():
|
|
118
|
+
continue
|
|
119
|
+
processes.append(info)
|
|
120
|
+
if len(processes) >= limit:
|
|
121
|
+
break
|
|
122
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
123
|
+
continue
|
|
124
|
+
|
|
125
|
+
# 按内存排序
|
|
126
|
+
processes.sort(key=lambda x: x.get("memory_percent", 0) or 0, reverse=True)
|
|
127
|
+
|
|
128
|
+
return SkillResult(
|
|
129
|
+
success=True,
|
|
130
|
+
data={"processes": processes, "count": len(processes)},
|
|
131
|
+
message=f"找到 {len(processes)} 个进程",
|
|
132
|
+
)
|
|
133
|
+
except ImportError:
|
|
134
|
+
return SkillResult(success=False, error="请安装 psutil: pip install psutil")
|
|
135
|
+
except Exception as e:
|
|
136
|
+
return SkillResult(success=False, error=str(e))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class CommandRunSkill(Skill):
|
|
140
|
+
"""执行系统命令"""
|
|
141
|
+
name = "command_run"
|
|
142
|
+
description = "执行系统命令并返回结果(Shell/Bash/PowerShell)"
|
|
143
|
+
category = "system"
|
|
144
|
+
parameters = [
|
|
145
|
+
SkillParameter("command", "string", "要执行的命令", required=True),
|
|
146
|
+
SkillParameter("timeout", "integer", "超时秒数", required=False, default=60),
|
|
147
|
+
SkillParameter("work_dir", "string", "工作目录", required=False, default=""),
|
|
148
|
+
]
|
|
149
|
+
dangerous = True
|
|
150
|
+
|
|
151
|
+
async def execute(self, command: str = "", timeout: int = 60,
|
|
152
|
+
work_dir: str = "", **kwargs) -> SkillResult:
|
|
153
|
+
try:
|
|
154
|
+
work_dir = work_dir or os.getcwd()
|
|
155
|
+
process = await asyncio.wait_for(
|
|
156
|
+
self._subprocess_exec(command, work_dir),
|
|
157
|
+
timeout=timeout,
|
|
158
|
+
)
|
|
159
|
+
return process
|
|
160
|
+
except asyncio.TimeoutError:
|
|
161
|
+
return SkillResult(success=False, error=f"命令执行超时 ({timeout}s)")
|
|
162
|
+
except Exception as e:
|
|
163
|
+
return SkillResult(success=False, error=str(e))
|
|
164
|
+
|
|
165
|
+
async def _subprocess_exec(self, command: str, work_dir: str) -> SkillResult:
|
|
166
|
+
"""执行子进程"""
|
|
167
|
+
process = await asyncio.create_subprocess_shell(
|
|
168
|
+
command,
|
|
169
|
+
stdout=asyncio.subprocess.PIPE,
|
|
170
|
+
stderr=asyncio.subprocess.PIPE,
|
|
171
|
+
cwd=work_dir,
|
|
172
|
+
)
|
|
173
|
+
stdout, stderr = await process.communicate()
|
|
174
|
+
stdout_str = stdout.decode("utf-8", errors="replace")
|
|
175
|
+
stderr_str = stderr.decode("utf-8", errors="replace")
|
|
176
|
+
|
|
177
|
+
return SkillResult(
|
|
178
|
+
success=process.returncode == 0,
|
|
179
|
+
data={
|
|
180
|
+
"exit_code": process.returncode,
|
|
181
|
+
"stdout": stdout_str,
|
|
182
|
+
"stderr": stderr_str,
|
|
183
|
+
},
|
|
184
|
+
message=stdout_str[:2000] if process.returncode == 0 else f"失败: {stderr_str[:500]}",
|
|
185
|
+
error=stderr_str if process.returncode != 0 else "",
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class EnvironmentGetSkill(Skill):
|
|
190
|
+
"""获取环境变量"""
|
|
191
|
+
name = "env_get"
|
|
192
|
+
description = "获取系统环境变量"
|
|
193
|
+
category = "system"
|
|
194
|
+
parameters = [
|
|
195
|
+
SkillParameter("key", "string", "环境变量名(空=全部)", required=False, default=""),
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
async def execute(self, key: str = "", **kwargs) -> SkillResult:
|
|
199
|
+
try:
|
|
200
|
+
if key:
|
|
201
|
+
value = os.environ.get(key)
|
|
202
|
+
if value is None:
|
|
203
|
+
return SkillResult(success=False, error=f"环境变量不存在: {key}")
|
|
204
|
+
return SkillResult(success=True, data={"key": key, "value": value})
|
|
205
|
+
else:
|
|
206
|
+
# 返回所有(过滤敏感信息)
|
|
207
|
+
sensitive = {"PASSWORD", "SECRET", "TOKEN", "KEY", "CREDENTIAL", "API_KEY"}
|
|
208
|
+
env = {}
|
|
209
|
+
for k, v in os.environ.items():
|
|
210
|
+
if not any(s in k.upper() for s in sensitive):
|
|
211
|
+
env[k] = v
|
|
212
|
+
return SkillResult(
|
|
213
|
+
success=True,
|
|
214
|
+
data={"count": len(env), "variables": env},
|
|
215
|
+
message=f"共 {len(env)} 个环境变量(已过滤敏感信息)",
|
|
216
|
+
)
|
|
217
|
+
except Exception as e:
|
|
218
|
+
return SkillResult(success=False, error=str(e))
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class PathExpandSkill(Skill):
|
|
222
|
+
"""路径操作"""
|
|
223
|
+
name = "path_info"
|
|
224
|
+
description = "获取路径的详细信息(绝对路径、父目录、扩展名等)"
|
|
225
|
+
category = "system"
|
|
226
|
+
parameters = [
|
|
227
|
+
SkillParameter("path", "string", "文件/目录路径", required=True),
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
async def execute(self, path: str = "", **kwargs) -> SkillResult:
|
|
231
|
+
try:
|
|
232
|
+
p = Path(path).expanduser().resolve()
|
|
233
|
+
return SkillResult(
|
|
234
|
+
success=True,
|
|
235
|
+
data={
|
|
236
|
+
"original": path,
|
|
237
|
+
"absolute": str(p),
|
|
238
|
+
"name": p.name,
|
|
239
|
+
"stem": p.stem,
|
|
240
|
+
"suffix": p.suffix,
|
|
241
|
+
"parent": str(p.parent),
|
|
242
|
+
"exists": p.exists(),
|
|
243
|
+
"is_file": p.is_file(),
|
|
244
|
+
"is_dir": p.is_dir(),
|
|
245
|
+
"size": p.stat().st_size if p.exists() else 0,
|
|
246
|
+
},
|
|
247
|
+
)
|
|
248
|
+
except Exception as e:
|
|
249
|
+
return SkillResult(success=False, error=str(e))
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-pro-max
|
|
3
|
+
description: UI/UX design intelligence and implementation guidance for building polished interfaces. Use when the user asks for UI design, UX flows, information architecture, visual style direction, design systems/tokens, component specs, copy/microcopy, accessibility, or to generate/critique/refine frontend UI (HTML/CSS/JS, React, Next.js, Vue, Svelte, Tailwind). Includes workflows for (1) generating new UI layouts and styling, (2) improving existing UI/UX, (3) producing design-system tokens and component guidelines, and (4) turning UX recommendations into concrete code changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow these steps to deliver high-quality UI/UX output with minimal back-and-forth.
|
|
7
|
+
|
|
8
|
+
## 1) Triage
|
|
9
|
+
Ask only what you must to avoid wrong work:
|
|
10
|
+
- Target platform: web / iOS / Android / desktop
|
|
11
|
+
- Stack (if code changes): React/Next/Vue/Svelte, CSS/Tailwind, component library
|
|
12
|
+
- Goal and constraints: conversion, speed, brand vibe, accessibility level (WCAG AA?)
|
|
13
|
+
- What you have: screenshot, Figma, repo, URL, user journey
|
|
14
|
+
|
|
15
|
+
If the user says "全部都要" (design + UX + code + design system), treat it as four deliverables and ship in that order.
|
|
16
|
+
|
|
17
|
+
## 2) Produce Deliverables (pick what fits)
|
|
18
|
+
Always be concrete: name components, states, spacing, typography, and interactions.
|
|
19
|
+
|
|
20
|
+
- **UI concept + layout**: Provide a clear visual direction, grid, typography, color system, key screens/sections.
|
|
21
|
+
- **UX flow**: Map the user journey, critical paths, error/empty/loading states, edge cases.
|
|
22
|
+
- **Design system**: Tokens (color/typography/spacing/radius/shadow), component rules, accessibility notes.
|
|
23
|
+
- **Implementation plan**: Exact file-level edits, component breakdown, and acceptance criteria.
|
|
24
|
+
|
|
25
|
+
## 3) Use Bundled Assets
|
|
26
|
+
This skill bundles data you can cite for inspiration/standards.
|
|
27
|
+
|
|
28
|
+
- **Design intelligence data**: Read from `skills/ui-ux-pro-max/assets/data/` when you need palettes, patterns, or UI/UX heuristics.
|
|
29
|
+
- **Upstream reference**: If you need more phrasing/examples, consult `skills/ui-ux-pro-max/references/upstream-skill-content.md`.
|
|
30
|
+
|
|
31
|
+
## 4) Optional Script (Design System Generator)
|
|
32
|
+
If you need to quickly generate tokens and page-specific overrides, use the bundled script:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python3 skills/ui-ux-pro-max/scripts/design_system.py --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Prefer running it when the user wants a structured token output (ASCII-friendly).
|
|
39
|
+
|
|
40
|
+
## Output Standards
|
|
41
|
+
- Default to ASCII-only tokens/variables unless the project already uses Unicode.
|
|
42
|
+
- Include: spacing scale, type scale, 2-3 font pair options, color tokens, component states.
|
|
43
|
+
- Always cover: empty/loading/error, keyboard navigation, focus states, contrast.
|