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,65 @@
|
|
|
1
|
+
# 输出 JSON Schema
|
|
2
|
+
|
|
3
|
+
解梦结果的完整 JSON 格式。前端根据此格式渲染"梦境解析卡"。
|
|
4
|
+
|
|
5
|
+
## 完整结构
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"dream_summary": "string — 一句话概括梦境内容(20字以内)",
|
|
10
|
+
"keywords": ["string — 梦境关键词,3-6个"],
|
|
11
|
+
"mood": "string — 情绪分类,枚举值见下方",
|
|
12
|
+
"color_scheme": "string — 配色方案名,与 mood 对应",
|
|
13
|
+
"visual_elements": ["string — 视觉元素标识,最多5个,见 visual-mapping.md"],
|
|
14
|
+
"interpretations": {
|
|
15
|
+
"zhouGong": {
|
|
16
|
+
"icon": "🔮",
|
|
17
|
+
"title": "周公解梦",
|
|
18
|
+
"content": "string — 主体解读,100-200字",
|
|
19
|
+
"fortune": "string — 吉凶判断:大吉/吉/中性/中性偏凶/凶",
|
|
20
|
+
"advice": "string — 一句话建议,宜忌格式"
|
|
21
|
+
},
|
|
22
|
+
"freud": {
|
|
23
|
+
"icon": "🧠",
|
|
24
|
+
"title": "心理分析",
|
|
25
|
+
"content": "string — 心理分析,100-200字",
|
|
26
|
+
"insight": "string — 一句话核心洞察",
|
|
27
|
+
"advice": "string — 一个具体的自我关照建议"
|
|
28
|
+
},
|
|
29
|
+
"cyber": {
|
|
30
|
+
"icon": "🌀",
|
|
31
|
+
"title": "赛博神棍",
|
|
32
|
+
"content": "string — 赛博解读,100-200字",
|
|
33
|
+
"prediction": "string — 一句离谱预言",
|
|
34
|
+
"advice": "string — 一个搞笑但具体的行动建议"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"overall_advice": "string — 综合建议,1-2句话,中立语气",
|
|
38
|
+
"shareable_text": "string — 可分享文案,包含emoji,适合发朋友圈,50字以内"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## mood 枚举值
|
|
43
|
+
|
|
44
|
+
| 值 | 含义 |
|
|
45
|
+
|----|------|
|
|
46
|
+
| anxious | 焦虑、恐惧、紧张 |
|
|
47
|
+
| peaceful | 平静、美好、舒适 |
|
|
48
|
+
| sad | 悲伤、失落、遗憾 |
|
|
49
|
+
| surreal | 奇幻、荒诞、超现实 |
|
|
50
|
+
| exciting | 兴奋、刺激、冒险 |
|
|
51
|
+
| nostalgic | 怀旧、温馨、思念 |
|
|
52
|
+
|
|
53
|
+
## color_scheme 与 mood 的对应
|
|
54
|
+
|
|
55
|
+
mood 和 color_scheme 值相同。前端根据 color_scheme 值从 visual-mapping.md 的配色表中取色。
|
|
56
|
+
|
|
57
|
+
## 输出要求
|
|
58
|
+
|
|
59
|
+
1. JSON 必须合法,可直接 JSON.parse
|
|
60
|
+
2. 用 ```json 代码块包裹
|
|
61
|
+
3. 所有 string 字段不能为空
|
|
62
|
+
4. keywords 数组 3-6 个元素
|
|
63
|
+
5. visual_elements 数组 1-5 个元素
|
|
64
|
+
6. 三个 interpretation 的 content 长度保持接近(都是100-200字)
|
|
65
|
+
7. shareable_text 要有趣,让人想转发
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 追问策略
|
|
2
|
+
|
|
3
|
+
## 原则
|
|
4
|
+
|
|
5
|
+
追问是为了让解读更准,不是为了凑数。用户说得清楚就少问,说得模糊才补问。
|
|
6
|
+
|
|
7
|
+
## 追问维度
|
|
8
|
+
|
|
9
|
+
按优先级排序,每次最多选 3 个最相关的:
|
|
10
|
+
|
|
11
|
+
### 1. 情绪状态(最高优先)
|
|
12
|
+
梦中的情绪决定解读基调。同样是"飞",兴奋的飞和恐惧的飞完全不同。
|
|
13
|
+
|
|
14
|
+
示例:
|
|
15
|
+
- "掉下去的时候是害怕,还是反而有种如释重负的感觉?"
|
|
16
|
+
- "被追的时候你是拼命跑,还是跑不动那种?"
|
|
17
|
+
- "见到那个人的时候你开心吗?"
|
|
18
|
+
|
|
19
|
+
### 2. 环境/场所
|
|
20
|
+
场所关联生活领域(公司=事业、家=家庭、学校=成长/压力)。
|
|
21
|
+
|
|
22
|
+
示例:
|
|
23
|
+
- "那个地方你认识吗?还是从没见过?"
|
|
24
|
+
- "室内还是室外?白天还是晚上?"
|
|
25
|
+
- "周围有别人吗?"
|
|
26
|
+
|
|
27
|
+
### 3. 人物关系
|
|
28
|
+
梦中人物通常是投射。认识的人 vs 陌生人解读方向完全不同。
|
|
29
|
+
|
|
30
|
+
示例:
|
|
31
|
+
- "梦里那个人你认识吗?什么关系?"
|
|
32
|
+
- "ta 在梦里对你是什么态度?"
|
|
33
|
+
|
|
34
|
+
### 4. 结局/走向
|
|
35
|
+
有结局和没结局的梦含义不同。
|
|
36
|
+
|
|
37
|
+
示例:
|
|
38
|
+
- "最后怎么样了?醒了还是有个结局?"
|
|
39
|
+
- "你在梦里解决了那个问题吗?"
|
|
40
|
+
|
|
41
|
+
## 追问风格
|
|
42
|
+
|
|
43
|
+
带角色感,像一个老练的解梦师在跟你聊天,不是在填问卷。
|
|
44
|
+
|
|
45
|
+
好的追问:
|
|
46
|
+
```
|
|
47
|
+
嗯...水里啊...
|
|
48
|
+
那个水是清的还是浑的?你是自己跳进去的还是不知道怎么就在水里了?
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
坏的追问:
|
|
52
|
+
```
|
|
53
|
+
请补充以下信息:
|
|
54
|
+
1. 水的颜色和清澈度
|
|
55
|
+
2. 进入水中的方式
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 跳过规则
|
|
59
|
+
|
|
60
|
+
- 用户说"不记得了"/"不知道" → 用最常见的默认值,继续解读
|
|
61
|
+
- 用户明确表示不想多说 → 直接进入解读,不追问了
|
|
62
|
+
- 用户描述已经很完整(包含情绪+环境+结局)→ 可以直接解读,最多追问 1 个
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# 梦境意象 → 视觉元素映射
|
|
2
|
+
|
|
3
|
+
## 情绪 → 配色方案
|
|
4
|
+
|
|
5
|
+
| mood 值 | 情绪 | 主色 | 辅色 | 背景 |
|
|
6
|
+
|---------|------|------|------|------|
|
|
7
|
+
| anxious | 焦虑/恐惧 | #2D1B69 深紫 | #1A1A2E 暗蓝 | 暗色渐变 |
|
|
8
|
+
| peaceful | 平静/美好 | #F4D35E 暖黄 | #83C5BE 柔绿 | 浅色渐变 |
|
|
9
|
+
| sad | 悲伤/失落 | #4A6FA5 灰蓝 | #2D3142 深灰 | 冷色渐变 |
|
|
10
|
+
| surreal | 奇幻/荒诞 | #FF006E 霓虹粉 | #8338EC 电紫 | 深色+霓虹点缀 |
|
|
11
|
+
| exciting | 兴奋/刺激 | #FF6B35 橙红 | #FFD700 金色 | 暖色渐变 |
|
|
12
|
+
| nostalgic | 怀旧/温馨 | #DDA15E 琥珀 | #BC6C25 暖棕 | 柔光渐变 |
|
|
13
|
+
|
|
14
|
+
## 意象 → 视觉元素
|
|
15
|
+
|
|
16
|
+
每个视觉元素对应 p5.js 中的一个绘制模块。
|
|
17
|
+
|
|
18
|
+
### 自然元素
|
|
19
|
+
|
|
20
|
+
| 意象关键词 | visual_element 值 | p5.js 表现 |
|
|
21
|
+
|-----------|-------------------|------------|
|
|
22
|
+
| 水、海、河、湖、游泳 | water_ripple | 正弦波纹,从底部向上扩散 |
|
|
23
|
+
| 雨 | rain_drops | 细线粒子从上方下落 |
|
|
24
|
+
| 火、燃烧 | fire_particles | 橙红粒子向上飘散 |
|
|
25
|
+
| 风、暴风 | wind_lines | 水平方向的曲线流动 |
|
|
26
|
+
| 星空、夜空 | starfield | 随机闪烁的小光点 |
|
|
27
|
+
| 月亮 | moon_glow | 圆形光晕,缓慢脉动 |
|
|
28
|
+
| 太阳、光 | sun_rays | 放射状光线 |
|
|
29
|
+
| 森林、树 | tree_silhouettes | 底部的树形剪影 |
|
|
30
|
+
| 花、花园 | floating_petals | 缓慢飘落的花瓣形状 |
|
|
31
|
+
|
|
32
|
+
### 空间/建筑
|
|
33
|
+
|
|
34
|
+
| 意象关键词 | visual_element 值 | p5.js 表现 |
|
|
35
|
+
|-----------|-------------------|------------|
|
|
36
|
+
| 高楼、大厦、塔 | building | 几何线条搭建的建筑轮廓 |
|
|
37
|
+
| 房间、室内 | room_frame | 透视线条构成的房间框架 |
|
|
38
|
+
| 门 | door_shape | 中央的门形轮廓,可能开/关 |
|
|
39
|
+
| 楼梯、阶梯 | stairs | 递进的台阶线条 |
|
|
40
|
+
| 迷宫、走廊 | maze_lines | 随机生成的路径线条 |
|
|
41
|
+
| 桥 | bridge_arc | 弧形桥梁轮廓 |
|
|
42
|
+
|
|
43
|
+
### 动作/状态
|
|
44
|
+
|
|
45
|
+
| 意象关键词 | visual_element 值 | p5.js 表现 |
|
|
46
|
+
|-----------|-------------------|------------|
|
|
47
|
+
| 坠落、掉下 | falling_particles | 粒子加速下落 |
|
|
48
|
+
| 飞、飘 | rising_particles | 粒子缓慢上升 |
|
|
49
|
+
| 追逐、逃跑 | speed_lines | 高速水平线条 |
|
|
50
|
+
| 困住、封闭 | cage_lines | 围合的线条逐渐收缩 |
|
|
51
|
+
| 迷路 | scattered_dots | 随机漂移的光点 |
|
|
52
|
+
|
|
53
|
+
### 人物/生物
|
|
54
|
+
|
|
55
|
+
| 意象关键词 | visual_element 值 | p5.js 表现 |
|
|
56
|
+
|-----------|-------------------|------------|
|
|
57
|
+
| 人、人影 | human_silhouette | 抽象人形剪影,淡入淡出 |
|
|
58
|
+
| 人群 | crowd_dots | 多个小圆点聚散 |
|
|
59
|
+
| 蛇 | snake_curve | S形曲线缓慢游动 |
|
|
60
|
+
| 猫/狗/动物 | animal_shape | 简笔动物轮廓 |
|
|
61
|
+
| 鸟/飞行生物 | bird_flight | V形轮廓横穿画面 |
|
|
62
|
+
| 鱼/水生物 | fish_swim | 椭圆形在水纹中穿行 |
|
|
63
|
+
|
|
64
|
+
### 氛围修饰
|
|
65
|
+
|
|
66
|
+
| 意象关键词 | visual_element 值 | p5.js 表现 |
|
|
67
|
+
|-----------|-------------------|------------|
|
|
68
|
+
| 黑暗、看不清 | dark_bg | 整体低亮度 + 模糊光斑 |
|
|
69
|
+
| 模糊、朦胧 | blur_lights | 高斯模糊的光点 |
|
|
70
|
+
| 闪烁、不稳定 | flicker_effect | 画面整体亮度随机波动 |
|
|
71
|
+
| 旋转、眩晕 | spiral_motion | 螺旋运动的粒子 |
|
|
72
|
+
| 安静、空旷 | minimal_space | 大面积留白 + 极少元素 |
|
|
73
|
+
|
|
74
|
+
## 映射规则
|
|
75
|
+
|
|
76
|
+
1. 从梦境描述中提取所有可识别意象
|
|
77
|
+
2. 每个意象对应一个 visual_element
|
|
78
|
+
3. visual_elements 数组最多 5 个元素(防止画面太乱)
|
|
79
|
+
4. 优先选择与主要情节相关的意象
|
|
80
|
+
5. 必须包含至少 1 个氛围修饰元素
|
|
81
|
+
6. mood 取梦境中最强烈的情绪,color_scheme 对应 mood
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Example helper script for dream-interpreter
|
|
4
|
+
|
|
5
|
+
This is a placeholder script that can be executed directly.
|
|
6
|
+
Replace with actual implementation or delete if not needed.
|
|
7
|
+
|
|
8
|
+
Example real scripts from other skills:
|
|
9
|
+
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
|
|
10
|
+
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def main():
|
|
14
|
+
print("This is an example script for dream-interpreter")
|
|
15
|
+
# TODO: Add actual script logic here
|
|
16
|
+
# This could be data processing, file conversion, API calls, etc.
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
main()
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"""
|
|
2
|
+
skills/file_skill.py - 文件操作技能
|
|
3
|
+
=====================================
|
|
4
|
+
提供文件读写、目录操作、文件搜索等功能。
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
import shutil
|
|
10
|
+
import glob as glob_module
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import List, Optional
|
|
13
|
+
|
|
14
|
+
from core.logger import get_logger
|
|
15
|
+
from skills.base import Skill, SkillResult, SkillParameter
|
|
16
|
+
|
|
17
|
+
logger = get_logger("myagent.skills.file")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class FileReadSkill(Skill):
|
|
21
|
+
"""读取文件内容"""
|
|
22
|
+
name = "file_read"
|
|
23
|
+
description = "读取指定文件的内容,支持指定编码和行数限制"
|
|
24
|
+
category = "file"
|
|
25
|
+
parameters = [
|
|
26
|
+
SkillParameter("path", "string", "文件路径(绝对路径或相对路径)", required=True),
|
|
27
|
+
SkillParameter("encoding", "string", "文件编码", required=False, default="utf-8"),
|
|
28
|
+
SkillParameter("offset", "integer", "起始行号(从0开始)", required=False, default=0),
|
|
29
|
+
SkillParameter("limit", "integer", "读取行数限制", required=False, default=500),
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
async def execute(self, path: str = "", encoding: str = "utf-8",
|
|
33
|
+
offset: int = 0, limit: int = 500, **kwargs) -> SkillResult:
|
|
34
|
+
try:
|
|
35
|
+
file_path = Path(path).expanduser().resolve()
|
|
36
|
+
if not file_path.exists():
|
|
37
|
+
return SkillResult(success=False, error=f"文件不存在: {path}")
|
|
38
|
+
|
|
39
|
+
with open(file_path, "r", encoding=encoding, errors="replace") as f:
|
|
40
|
+
lines = f.readlines()
|
|
41
|
+
|
|
42
|
+
total_lines = len(lines)
|
|
43
|
+
selected = lines[offset:offset + limit]
|
|
44
|
+
content = "".join(selected)
|
|
45
|
+
|
|
46
|
+
return SkillResult(
|
|
47
|
+
success=True,
|
|
48
|
+
data={
|
|
49
|
+
"path": str(file_path),
|
|
50
|
+
"content": content,
|
|
51
|
+
"total_lines": total_lines,
|
|
52
|
+
"showed_lines": len(selected),
|
|
53
|
+
"offset": offset,
|
|
54
|
+
},
|
|
55
|
+
message=f"已读取 {file_path.name} ({len(selected)}/{total_lines} 行)",
|
|
56
|
+
)
|
|
57
|
+
except Exception as e:
|
|
58
|
+
return SkillResult(success=False, error=str(e))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class FileWriteSkill(Skill):
|
|
62
|
+
"""写入文件内容"""
|
|
63
|
+
name = "file_write"
|
|
64
|
+
description = "将内容写入指定文件,支持创建目录和追加模式"
|
|
65
|
+
category = "file"
|
|
66
|
+
parameters = [
|
|
67
|
+
SkillParameter("path", "string", "文件路径", required=True),
|
|
68
|
+
SkillParameter("content", "string", "要写入的内容", required=True),
|
|
69
|
+
SkillParameter("encoding", "string", "文件编码", required=False, default="utf-8"),
|
|
70
|
+
SkillParameter("append", "boolean", "是否追加模式", required=False, default=False),
|
|
71
|
+
]
|
|
72
|
+
dangerous = True
|
|
73
|
+
|
|
74
|
+
async def execute(self, path: str = "", content: str = "",
|
|
75
|
+
encoding: str = "utf-8", append: bool = False, **kwargs) -> SkillResult:
|
|
76
|
+
try:
|
|
77
|
+
file_path = Path(path).expanduser().resolve()
|
|
78
|
+
file_path.parent.mkdir(parents=True, exist_ok=True)
|
|
79
|
+
|
|
80
|
+
mode = "a" if append else "w"
|
|
81
|
+
with open(file_path, mode, encoding=encoding) as f:
|
|
82
|
+
f.write(content)
|
|
83
|
+
|
|
84
|
+
return SkillResult(
|
|
85
|
+
success=True,
|
|
86
|
+
data={"path": str(file_path), "size": len(content)},
|
|
87
|
+
message=f"已写入 {file_path.name} ({len(content)} 字符)",
|
|
88
|
+
files=[str(file_path)],
|
|
89
|
+
)
|
|
90
|
+
except Exception as e:
|
|
91
|
+
return SkillResult(success=False, error=str(e))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class FileListSkill(Skill):
|
|
95
|
+
"""列出目录内容"""
|
|
96
|
+
name = "file_list"
|
|
97
|
+
description = "列出指定目录下的文件和子目录"
|
|
98
|
+
category = "file"
|
|
99
|
+
parameters = [
|
|
100
|
+
SkillParameter("path", "string", "目录路径", required=True),
|
|
101
|
+
SkillParameter("pattern", "string", "文件匹配模式(如 *.py)", required=False, default="*"),
|
|
102
|
+
SkillParameter("recursive", "boolean", "是否递归", required=False, default=False),
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
async def execute(self, path: str = "", pattern: str = "*",
|
|
106
|
+
recursive: bool = False, **kwargs) -> SkillResult:
|
|
107
|
+
try:
|
|
108
|
+
dir_path = Path(path).expanduser().resolve()
|
|
109
|
+
if not dir_path.exists():
|
|
110
|
+
return SkillResult(success=False, error=f"目录不存在: {path}")
|
|
111
|
+
if not dir_path.is_dir():
|
|
112
|
+
return SkillResult(success=False, error=f"不是目录: {path}")
|
|
113
|
+
|
|
114
|
+
if recursive:
|
|
115
|
+
items = sorted(dir_path.rglob(pattern))
|
|
116
|
+
else:
|
|
117
|
+
items = sorted(dir_path.glob(pattern))
|
|
118
|
+
|
|
119
|
+
result = []
|
|
120
|
+
for item in items:
|
|
121
|
+
try:
|
|
122
|
+
stat = item.stat()
|
|
123
|
+
result.append({
|
|
124
|
+
"name": item.name,
|
|
125
|
+
"path": str(item),
|
|
126
|
+
"is_dir": item.is_dir(),
|
|
127
|
+
"size": stat.st_size,
|
|
128
|
+
})
|
|
129
|
+
except OSError:
|
|
130
|
+
result.append({
|
|
131
|
+
"name": item.name,
|
|
132
|
+
"path": str(item),
|
|
133
|
+
"is_dir": item.is_dir(),
|
|
134
|
+
"size": 0,
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
return SkillResult(
|
|
138
|
+
success=True,
|
|
139
|
+
data={"path": str(dir_path), "items": result, "count": len(result)},
|
|
140
|
+
message=f"共 {len(result)} 个项目",
|
|
141
|
+
)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
return SkillResult(success=False, error=str(e))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class FileDeleteSkill(Skill):
|
|
147
|
+
"""删除文件或目录"""
|
|
148
|
+
name = "file_delete"
|
|
149
|
+
description = "删除指定文件或目录"
|
|
150
|
+
category = "file"
|
|
151
|
+
parameters = [
|
|
152
|
+
SkillParameter("path", "string", "文件/目录路径", required=True),
|
|
153
|
+
SkillParameter("recursive", "boolean", "递归删除目录", required=False, default=False),
|
|
154
|
+
]
|
|
155
|
+
dangerous = True
|
|
156
|
+
|
|
157
|
+
async def execute(self, path: str = "", recursive: bool = False, **kwargs) -> SkillResult:
|
|
158
|
+
try:
|
|
159
|
+
target = Path(path).expanduser().resolve()
|
|
160
|
+
if not target.exists():
|
|
161
|
+
return SkillResult(success=False, error=f"不存在: {path}")
|
|
162
|
+
|
|
163
|
+
if target.is_dir():
|
|
164
|
+
if recursive:
|
|
165
|
+
shutil.rmtree(target)
|
|
166
|
+
else:
|
|
167
|
+
shutil.rmdir(target)
|
|
168
|
+
else:
|
|
169
|
+
target.unlink()
|
|
170
|
+
|
|
171
|
+
return SkillResult(
|
|
172
|
+
success=True,
|
|
173
|
+
message=f"已删除: {path}",
|
|
174
|
+
)
|
|
175
|
+
except Exception as e:
|
|
176
|
+
return SkillResult(success=False, error=str(e))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class FileSearchSkill(Skill):
|
|
180
|
+
"""搜索文件内容"""
|
|
181
|
+
name = "file_search"
|
|
182
|
+
description = "在文件中搜索包含指定文本的行"
|
|
183
|
+
category = "file"
|
|
184
|
+
parameters = [
|
|
185
|
+
SkillParameter("path", "string", "搜索目录路径", required=True),
|
|
186
|
+
SkillParameter("query", "string", "搜索关键词或正则表达式", required=True),
|
|
187
|
+
SkillParameter("pattern", "string", "文件匹配模式", required=False, default="*"),
|
|
188
|
+
SkillParameter("max_results", "integer", "最大结果数", required=False, default=50),
|
|
189
|
+
]
|
|
190
|
+
|
|
191
|
+
async def execute(self, path: str = "", query: str = "", pattern: str = "*",
|
|
192
|
+
max_results: int = 50, **kwargs) -> SkillResult:
|
|
193
|
+
try:
|
|
194
|
+
search_dir = Path(path).expanduser().resolve()
|
|
195
|
+
if not search_dir.is_dir():
|
|
196
|
+
return SkillResult(success=False, error=f"不是目录: {path}")
|
|
197
|
+
|
|
198
|
+
results = []
|
|
199
|
+
for file_path in search_dir.rglob(pattern):
|
|
200
|
+
if len(results) >= max_results:
|
|
201
|
+
break
|
|
202
|
+
if not file_path.is_file():
|
|
203
|
+
continue
|
|
204
|
+
try:
|
|
205
|
+
with open(file_path, "r", encoding="utf-8", errors="replace") as f:
|
|
206
|
+
for i, line in enumerate(f):
|
|
207
|
+
if query.lower() in line.lower():
|
|
208
|
+
results.append({
|
|
209
|
+
"file": str(file_path),
|
|
210
|
+
"line": i + 1,
|
|
211
|
+
"content": line.strip(),
|
|
212
|
+
})
|
|
213
|
+
if len(results) >= max_results:
|
|
214
|
+
break
|
|
215
|
+
except (IOError, OSError):
|
|
216
|
+
continue
|
|
217
|
+
|
|
218
|
+
return SkillResult(
|
|
219
|
+
success=True,
|
|
220
|
+
data={"query": query, "results": results, "count": len(results)},
|
|
221
|
+
message=f"找到 {len(results)} 处匹配",
|
|
222
|
+
)
|
|
223
|
+
except Exception as e:
|
|
224
|
+
return SkillResult(success=False, error=str(e))
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class FileMoveSkill(Skill):
|
|
228
|
+
"""移动/重命名文件"""
|
|
229
|
+
name = "file_move"
|
|
230
|
+
description = "移动或重命名文件/目录"
|
|
231
|
+
category = "file"
|
|
232
|
+
parameters = [
|
|
233
|
+
SkillParameter("source", "string", "源路径", required=True),
|
|
234
|
+
SkillParameter("destination", "string", "目标路径", required=True),
|
|
235
|
+
]
|
|
236
|
+
dangerous = True
|
|
237
|
+
|
|
238
|
+
async def execute(self, source: str = "", destination: str = "", **kwargs) -> SkillResult:
|
|
239
|
+
try:
|
|
240
|
+
src = Path(source).expanduser().resolve()
|
|
241
|
+
dst = Path(destination).expanduser().resolve()
|
|
242
|
+
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
243
|
+
shutil.move(str(src), str(dst))
|
|
244
|
+
return SkillResult(success=True, message=f"已移动: {source} → {destination}")
|
|
245
|
+
except Exception as e:
|
|
246
|
+
return SkillResult(success=False, error=str(e))
|