myagent-ai 1.26.3 → 1.26.5
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//"docs/351205215347275256344275277347224250350257264346230216.md/" +0 -0
- package/agents/main_agent.py +77 -43
- package/config.py +2 -2
- package/core/llm.py +23 -2
- package/core/output_parser.py +30 -2
- package/package.json +1 -1
- package/scripts/cli.py +18 -8
- package/skills/ASR/LICENSE.txt +0 -0
- package/skills/ASR/SKILL.md +0 -0
- package/skills/ASR/scripts/asr.ts +0 -0
- package/skills/LLM/LICENSE.txt +0 -0
- package/skills/LLM/SKILL.md +0 -0
- package/skills/LLM/scripts/chat.ts +0 -0
- package/skills/TTS/LICENSE.txt +0 -0
- package/skills/TTS/SKILL.md +0 -0
- package/skills/TTS/tts.ts +0 -0
- package/skills/VLM/LICENSE.txt +0 -0
- package/skills/VLM/SKILL.md +0 -0
- package/skills/VLM/scripts/vlm.ts +0 -0
- package/skills/__init__.py +0 -0
- package/skills/admin-manager/SKILL.md +0 -0
- package/skills/agent-browser/SKILL.md +0 -0
- package/skills/agent_tool_skill.py +0 -0
- package/skills/ai-news-collectors/SKILL.md +0 -0
- package/skills/ai-news-collectors/_meta.json +0 -0
- package/skills/ai-news-collectors/references/sources.md +0 -0
- package/skills/aminer-open-academic/SKILL.md +0 -0
- package/skills/aminer-open-academic/_meta.json +0 -0
- package/skills/aminer-open-academic/evals/evals.json +0 -0
- package/skills/aminer-open-academic/references/api-catalog.md +0 -0
- package/skills/aminer-open-academic/scripts/aminer_client.py +0 -0
- package/skills/auto-target-tracker/SKILL.md +0 -0
- package/skills/base.py +0 -0
- package/skills/blog-writer/2024-02-17-radical-transparency-sales.md +0 -0
- package/skills/blog-writer/2024-02-17-raycast-spotlight-superpowers.md +0 -0
- package/skills/blog-writer/2024-02-17-short-form-content-marketing.md +0 -0
- package/skills/blog-writer/2024-02-17-typing-speed-benefits.md +0 -0
- package/skills/blog-writer/2024-03-14-effective-ai-prompts.md +0 -0
- package/skills/blog-writer/2024-11-08-ai-revolutionizing-entry-level-sales.md +0 -0
- package/skills/blog-writer/2025-11-12-why-ai-art-is-useless.md +0 -0
- package/skills/blog-writer/README.md +0 -0
- package/skills/blog-writer/SKILL.md +0 -0
- package/skills/blog-writer/_meta.json +0 -0
- package/skills/blog-writer/manage_examples.py +0 -0
- package/skills/blog-writer/style-guide.md +0 -0
- package/skills/browser_skill.py +0 -0
- package/skills/charts/LICENSE.txt +0 -0
- package/skills/charts/SKILL.md +0 -0
- package/skills/charts/references/_rules.md +0 -0
- package/skills/charts/references/d3.md +0 -0
- package/skills/charts/references/echarts.md +0 -0
- package/skills/charts/references/matplotlib.md +0 -0
- package/skills/charts/references/mermaid.md +0 -0
- package/skills/charts/references/mindmap-css.md +0 -0
- package/skills/charts/references/playwright-css.md +0 -0
- package/skills/charts/references/radial-grid.md +0 -0
- package/skills/charts/references/seaborn.md +0 -0
- package/skills/charts/setup.sh +0 -0
- package/skills/chromedev_mcp.py +0 -0
- package/skills/coding-agent/SKILL.md +0 -0
- package/skills/coding-agent/_meta.json +0 -0
- package/skills/coding-agent/criteria.md +0 -0
- package/skills/coding-agent/execution.md +0 -0
- package/skills/coding-agent/memory-template.md +0 -0
- package/skills/coding-agent/planning.md +0 -0
- package/skills/coding-agent/state.md +0 -0
- package/skills/coding-agent/verification.md +0 -0
- package/skills/content-strategy/SKILL.md +0 -0
- package/skills/content-strategy/_meta.json +0 -0
- package/skills/contentanalysis/ExtractWisdom/SKILL.md +0 -0
- package/skills/contentanalysis/ExtractWisdom/Workflows/Extract.md +0 -0
- package/skills/contentanalysis/SKILL.md +0 -0
- package/skills/docx/LICENSE.txt +0 -0
- package/skills/docx/SKILL.md +0 -0
- package/skills/docx/references/chart-templates.md +0 -0
- package/skills/docx/references/common-rules.md +0 -0
- package/skills/docx/references/decorations.md +0 -0
- package/skills/docx/references/design-system.md +0 -0
- package/skills/docx/references/docx-js-advanced.md +0 -0
- package/skills/docx/references/docx-js-core.md +0 -0
- package/skills/docx/references/faq.md +0 -0
- package/skills/docx/references/math-formulas.md +0 -0
- package/skills/docx/references/ooxml.md +0 -0
- package/skills/docx/references/toc.md +0 -0
- package/skills/docx/routes/comment.md +0 -0
- package/skills/docx/routes/create.md +0 -0
- package/skills/docx/routes/edit.md +0 -0
- package/skills/docx/routes/format.md +0 -0
- package/skills/docx/routes/read.md +0 -0
- package/skills/docx/scenes/academic.md +0 -0
- package/skills/docx/scenes/contract.md +0 -0
- package/skills/docx/scenes/copywriting.md +0 -0
- package/skills/docx/scenes/exam.md +0 -0
- package/skills/docx/scenes/official-doc.md +0 -0
- package/skills/docx/scenes/report.md +0 -0
- package/skills/docx/scenes/resume.md +0 -0
- package/skills/docx/scripts/__init__.py +0 -0
- package/skills/docx/scripts/add_toc_placeholders.py +0 -0
- package/skills/docx/scripts/document.py +0 -0
- package/skills/docx/scripts/postcheck.py +0 -0
- package/skills/docx/scripts/templates/comments.xml +0 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +0 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +0 -0
- package/skills/docx/scripts/templates/commentsIds.xml +0 -0
- package/skills/docx/scripts/templates/people.xml +0 -0
- package/skills/docx/scripts/utilities.py +0 -0
- package/skills/docx/setup.sh +0 -0
- package/skills/docx_skill.py +0 -0
- package/skills/dream-interpreter/SKILL.md +0 -0
- package/skills/dream-interpreter/assets/example_asset.txt +0 -0
- package/skills/dream-interpreter/references/api_reference.md +0 -0
- package/skills/dream-interpreter/references/interpretation-guide.md +0 -0
- package/skills/dream-interpreter/references/output-schema.md +0 -0
- package/skills/dream-interpreter/references/questioning-strategy.md +0 -0
- package/skills/dream-interpreter/references/visual-mapping.md +0 -0
- package/skills/dream-interpreter/scripts/example.py +0 -0
- package/skills/dream-interpreter/skill.json +0 -0
- package/skills/file_send.py +0 -0
- package/skills/file_skill.py +0 -0
- package/skills/finance/Finance_API_Doc.md +0 -0
- package/skills/finance/SKILL.md +0 -0
- package/skills/fullstack-dev/SKILL.md +0 -0
- package/skills/fullstack-dev/references/api-design.md +0 -0
- package/skills/fullstack-dev/references/auth-flow.md +0 -0
- package/skills/fullstack-dev/references/db-schema.md +0 -0
- package/skills/fullstack-dev/references/django-best-practices.md +0 -0
- package/skills/fullstack-dev/references/environment-management.md +0 -0
- package/skills/fullstack-dev/references/release-checklist.md +0 -0
- package/skills/fullstack-dev/references/technology-selection.md +0 -0
- package/skills/fullstack-dev/references/testing-strategy.md +0 -0
- package/skills/get-fortune-analysis/SKILL.md +0 -0
- package/skills/get-fortune-analysis/lunar_python.py +0 -0
- package/skills/gift-evaluator/SKILL.md +0 -0
- package/skills/gift-evaluator/html_tools.py +0 -0
- package/skills/gui_skill.py +0 -0
- package/skills/image-edit/LICENSE.txt +0 -0
- package/skills/image-edit/SKILL.md +0 -0
- package/skills/image-edit/scripts/image-edit.ts +0 -0
- package/skills/image-generation/LICENSE.txt +0 -0
- package/skills/image-generation/SKILL.md +0 -0
- package/skills/image-generation/scripts/image-generation.ts +0 -0
- package/skills/image-understand/LICENSE.txt +0 -0
- package/skills/image-understand/SKILL.md +0 -0
- package/skills/image-understand/scripts/image-understand.ts +0 -0
- package/skills/interview-designer/README.md +0 -0
- package/skills/interview-designer/SKILL.md +0 -0
- package/skills/interview-designer/_meta.json +0 -0
- package/skills/interview-designer/references/design_rationale.md +0 -0
- package/skills/interview-designer/templates/interview_guide_template.md +0 -0
- package/skills/market-research-reports/SKILL.md +0 -0
- package/skills/market-research-reports/assets/FORMATTING_GUIDE.md +0 -0
- package/skills/market-research-reports/assets/market_report_template.tex +0 -0
- package/skills/market-research-reports/assets/market_research.sty +0 -0
- package/skills/market-research-reports/references/data_analysis_patterns.md +0 -0
- package/skills/market-research-reports/references/report_structure_guide.md +0 -0
- package/skills/market-research-reports/references/visual_generation_guide.md +0 -0
- package/skills/market-research-reports/scripts/generate_market_visuals.py +0 -0
- package/skills/marketing-mode/README.md +0 -0
- package/skills/marketing-mode/SKILL.md +0 -0
- package/skills/marketing-mode/_meta.json +0 -0
- package/skills/marketing-mode/mode-prompt.md +0 -0
- package/skills/marketing-mode/skill.json +0 -0
- package/skills/mindfulness-meditation/SKILL.md +0 -0
- package/skills/mindfulness-meditation/_meta.json +0 -0
- package/skills/multi-search-engine/CHANGELOG.md +0 -0
- package/skills/multi-search-engine/CHANNELLOG.md +0 -0
- package/skills/multi-search-engine/SKILL.md +0 -0
- package/skills/multi-search-engine/_meta.json +0 -0
- package/skills/multi-search-engine/config.json +0 -0
- package/skills/multi-search-engine/metadata.json +0 -0
- package/skills/multi-search-engine/references/international-search.md +0 -0
- package/skills/pdf/LICENSE.txt +0 -0
- package/skills/pdf/SKILL.md +0 -0
- package/skills/pdf/briefs/academic.md +0 -0
- package/skills/pdf/briefs/creative.md +0 -0
- package/skills/pdf/briefs/poster.md +0 -0
- package/skills/pdf/briefs/process-advanced.md +0 -0
- package/skills/pdf/briefs/process.md +0 -0
- package/skills/pdf/briefs/report.md +0 -0
- package/skills/pdf/configs/components.md +0 -0
- package/skills/pdf/configs/fonts.md +0 -0
- package/skills/pdf/configs/visual_framework.md +0 -0
- package/skills/pdf/references/resume-academic.tex +0 -0
- package/skills/pdf/references/resume-altacv.tex +0 -0
- package/skills/pdf/scripts/cover_validate.js +0 -0
- package/skills/pdf/scripts/design_engine.py +0 -0
- package/skills/pdf/scripts/html2pdf-next.js +0 -0
- package/skills/pdf/scripts/html2poster.js +0 -0
- package/skills/pdf/scripts/pdf.py +0 -0
- package/skills/pdf/scripts/pdf_qa.py +0 -0
- package/skills/pdf/scripts/poster_validate.py +0 -0
- package/skills/pdf/scripts/setup.sh +0 -0
- package/skills/pdf/scripts/toc_validate.py +0 -0
- package/skills/pdf/typesetting/charts.md +0 -0
- package/skills/pdf/typesetting/cover-backgrounds.md +0 -0
- package/skills/pdf/typesetting/cover.md +0 -0
- package/skills/pdf/typesetting/fill-engine.md +0 -0
- package/skills/pdf/typesetting/geometry.md +0 -0
- package/skills/pdf/typesetting/overflow.md +0 -0
- package/skills/pdf/typesetting/pagination.md +0 -0
- package/skills/pdf/typesetting/palette.md +0 -0
- package/skills/pdf/typesetting/typography.md +0 -0
- package/skills/pdf_skill.py +0 -0
- package/skills/podcast-generate/LICENSE.txt +0 -0
- package/skills/podcast-generate/SKILL.md +0 -0
- package/skills/podcast-generate/generate.ts +0 -0
- package/skills/podcast-generate/package.json +0 -0
- package/skills/podcast-generate/readme.md +0 -0
- package/skills/podcast-generate/test_data/segments.jsonl +0 -0
- package/skills/podcast-generate/tsconfig.json +0 -0
- package/skills/ppt/.claude/settings.local.json +0 -0
- package/skills/ppt/LICENSE.txt +0 -0
- package/skills/ppt/SKILL.md +0 -0
- package/skills/ppt/beamer.md +0 -0
- package/skills/ppt/components.md +0 -0
- package/skills/ppt/data-viz-components.md +0 -0
- package/skills/ppt/design-system.md +0 -0
- package/skills/ppt/html2pptx.md +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -0
- package/skills/ppt/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -0
- package/skills/ppt/ooxml/schemas/mce/mc.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-2010.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-2012.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-2018.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-cex-2018.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-cid-2016.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -0
- package/skills/ppt/ooxml/schemas/microsoft/wml-symex-2015.xsd +0 -0
- package/skills/ppt/ooxml/scripts/pack.py +0 -0
- package/skills/ppt/ooxml/scripts/unpack.py +0 -0
- package/skills/ppt/ooxml/scripts/validate.py +0 -0
- package/skills/ppt/ooxml/scripts/validation/__init__.py +0 -0
- package/skills/ppt/ooxml/scripts/validation/base.py +0 -0
- package/skills/ppt/ooxml/scripts/validation/docx.py +0 -0
- package/skills/ppt/ooxml/scripts/validation/pptx.py +0 -0
- package/skills/ppt/ooxml/scripts/validation/redlining.py +0 -0
- package/skills/ppt/ooxml.md +0 -0
- package/skills/ppt/references/beamer.md +0 -0
- package/skills/ppt/references/latex.md +0 -0
- package/skills/ppt/references/paper-navbar.tex +0 -0
- package/skills/ppt/references/progress-navbar.tex +0 -0
- package/skills/ppt/scripts/html2pptx.js +0 -0
- package/skills/ppt/scripts/inventory.py +0 -0
- package/skills/ppt/scripts/pdf.py +0 -0
- package/skills/ppt/scripts/rearrange.py +0 -0
- package/skills/ppt/scripts/replace.py +0 -0
- package/skills/ppt/scripts/tectonic +0 -0
- package/skills/ppt/scripts/thumbnail.py +0 -0
- package/skills/ppt/setup.sh +0 -0
- package/skills/ppt/themes.md +0 -0
- package/skills/ppt_skill.py +0 -0
- package/skills/qingyan-research/SKILL.md +0 -0
- package/skills/qingyan-research/generate_html.py +0 -0
- package/skills/registry.py +0 -0
- package/skills/search_skill.py +0 -0
- package/skills/seo-content-writer/SKILL.md +0 -0
- package/skills/seo-content-writer/_meta.json +0 -0
- package/skills/seo-content-writer/references/content-structure-templates.md +0 -0
- package/skills/seo-content-writer/references/title-formulas.md +0 -0
- package/skills/skill-creator/LICENSE.txt +0 -0
- package/skills/skill-creator/SKILL.md +0 -0
- package/skills/skill-creator/agents/analyzer.md +0 -0
- package/skills/skill-creator/agents/comparator.md +0 -0
- package/skills/skill-creator/agents/grader.md +0 -0
- package/skills/skill-creator/assets/eval_review.html +0 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +0 -0
- package/skills/skill-creator/eval-viewer/viewer.html +0 -0
- package/skills/skill-creator/references/schemas.md +0 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -0
- package/skills/skill-creator/scripts/generate_report.py +0 -0
- package/skills/skill-creator/scripts/improve_description.py +0 -0
- package/skills/skill-creator/scripts/package_skill.py +0 -0
- package/skills/skill-creator/scripts/quick_validate.py +0 -0
- package/skills/skill-creator/scripts/run_eval.py +0 -0
- package/skills/skill-creator/scripts/run_loop.py +0 -0
- package/skills/skill-creator/scripts/utils.py +0 -0
- package/skills/skill-finder-cn/SKILL.md +0 -0
- package/skills/skill-finder-cn/_meta.json +0 -0
- package/skills/skill-finder-cn/package.json +0 -0
- package/skills/skill-finder-cn/scripts/search.sh +0 -0
- package/skills/skill-vetter/SKILL.md +0 -0
- package/skills/stock-analysis-skill/SKILL.md +0 -0
- package/skills/stock-analysis-skill/package.json +0 -0
- package/skills/stock-analysis-skill/src/analyzer.ts +0 -0
- package/skills/stock-analysis-skill/src/dataFetcher.ts +0 -0
- package/skills/stock-analysis-skill/src/dividend.ts +0 -0
- package/skills/stock-analysis-skill/src/index.ts +0 -0
- package/skills/stock-analysis-skill/src/rumorScanner.ts +0 -0
- package/skills/stock-analysis-skill/src/types.ts +0 -0
- package/skills/stock-analysis-skill/src/watchlist.ts +0 -0
- package/skills/stock-analysis-skill/tsconfig.json +0 -0
- package/skills/storyboard-manager/SKILL.md +0 -0
- package/skills/storyboard-manager/index.js +0 -0
- package/skills/storyboard-manager/package.json +0 -0
- package/skills/storyboard-manager/references/character_development.md +0 -0
- package/skills/storyboard-manager/references/story_structures.md +0 -0
- package/skills/storyboard-manager/scripts/consistency_checker.py +0 -0
- package/skills/storyboard-manager/scripts/timeline_tracker.py +0 -0
- package/skills/system_skill.py +0 -0
- package/skills/ui-ux-pro-max/SKILL.md +0 -0
- package/skills/ui-ux-pro-max/_meta.json +0 -0
- package/skills/ui-ux-pro-max/assets/data/charts.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/colors.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/icons.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/landing.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/products.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/react-performance.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/astro.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/flutter.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/html-tailwind.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/jetpack-compose.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nextjs.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxt-ui.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/nuxtjs.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react-native.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/react.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/shadcn.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/svelte.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/swiftui.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/stacks/vue.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/styles.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/typography.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/ui-reasoning.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/ux-guidelines.csv +0 -0
- package/skills/ui-ux-pro-max/assets/data/web-interface.csv +0 -0
- package/skills/ui-ux-pro-max/data/charts.csv +0 -0
- package/skills/ui-ux-pro-max/data/colors.csv +0 -0
- package/skills/ui-ux-pro-max/data/icons.csv +0 -0
- package/skills/ui-ux-pro-max/data/landing.csv +0 -0
- package/skills/ui-ux-pro-max/data/products.csv +0 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -0
- package/skills/ui-ux-pro-max/data/styles.csv +0 -0
- package/skills/ui-ux-pro-max/data/typography.csv +0 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +0 -0
- package/skills/ui-ux-pro-max/references/upstream-README.md +0 -0
- package/skills/ui-ux-pro-max/references/upstream-skill-content.md +0 -0
- package/skills/ui-ux-pro-max/scripts/__init__.py +0 -0
- package/skills/ui-ux-pro-max/scripts/core.py +0 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +0 -0
- package/skills/ui-ux-pro-max/scripts/search.py +0 -0
- package/skills/video-generation/LICENSE.txt +0 -0
- package/skills/video-generation/SKILL.md +0 -0
- package/skills/video-generation/scripts/video.ts +0 -0
- package/skills/video-understand/LICENSE.txt +0 -0
- package/skills/video-understand/SKILL.md +0 -0
- package/skills/video-understand/scripts/video-understand.ts +0 -0
- package/skills/visual-design-foundations/SKILL.md +0 -0
- package/skills/visual-design-foundations/references/color-systems.md +0 -0
- package/skills/visual-design-foundations/references/spacing-iconography.md +0 -0
- package/skills/visual-design-foundations/references/typography-systems.md +0 -0
- package/skills/web-reader/LICENSE.txt +0 -0
- package/skills/web-reader/SKILL.md +0 -0
- package/skills/web-reader/scripts/web-reader.ts +0 -0
- package/skills/web-search/LICENSE.txt +0 -0
- package/skills/web-search/SKILL.md +0 -0
- package/skills/web-search/scripts/web_search.ts +0 -0
- package/skills/web-shader-extractor/SKILL.md +0 -0
- package/skills/web-shader-extractor/references/config-extraction.md +0 -0
- package/skills/web-shader-extractor/references/encoded-definitions.md +0 -0
- package/skills/web-shader-extractor/references/extraction-workflow.md +0 -0
- package/skills/web-shader-extractor/references/porting-strategy.md +0 -0
- package/skills/web-shader-extractor/references/shader-injection.md +0 -0
- package/skills/web-shader-extractor/references/shaders-com.md +0 -0
- package/skills/web-shader-extractor/references/tech-signatures.md +0 -0
- package/skills/web-shader-extractor/references/tsl-extraction.md +0 -0
- package/skills/web-shader-extractor/references/unicorn-studio.md +0 -0
- package/skills/web-shader-extractor/scripts/fetch-rendered-dom.mjs +0 -0
- package/skills/web-shader-extractor/scripts/scan-bundle.sh +0 -0
- package/skills/writing-plans/SKILL.md +0 -0
- package/skills/writing-plans/_meta.json +0 -0
- package/skills/xlsx/LICENSE.txt +0 -0
- package/skills/xlsx/SKILL.md +0 -0
- package/skills/xlsx/engines/chart-templates.md +0 -0
- package/skills/xlsx/engines/chart.md +0 -0
- package/skills/xlsx/engines/design.md +0 -0
- package/skills/xlsx/engines/vba-templates.md +0 -0
- package/skills/xlsx/quality/pipeline.md +0 -0
- package/skills/xlsx/scenes/advanced.md +0 -0
- package/skills/xlsx/scenes/analyze-recipes.md +0 -0
- package/skills/xlsx/scenes/analyze.md +0 -0
- package/skills/xlsx/scenes/convert.md +0 -0
- package/skills/xlsx/scenes/create.md +0 -0
- package/skills/xlsx/scenes/edit-patterns.md +0 -0
- package/skills/xlsx/scenes/edit.md +0 -0
- package/skills/xlsx/scenes/finance.md +0 -0
- package/skills/xlsx/scenes/finance_lite.md +0 -0
- package/skills/xlsx/scenes/vba.md +0 -0
- package/skills/xlsx/setup.sh +0 -0
- package/skills/xlsx/templates/base.py +0 -0
- package/skills/xlsx/templates/palettes.py +0 -0
- package/skills/xlsx/xlsx.py +0 -0
- package/skills/xlsx_skill.py +0 -0
- package/web/__init__.py +0 -0
- package/web/api_server.py +0 -0
- package/web/tts_handler.py +0 -0
- package/web/ui/admin/admin-agentchat.js +0 -0
- package/web/ui/admin/admin-agents.js +0 -0
- package/web/ui/admin/admin-core.js +0 -0
- package/web/ui/admin/admin-dashboard.js +0 -0
- package/web/ui/admin/admin-executor.js +0 -0
- package/web/ui/admin/admin-files.js +0 -0
- package/web/ui/admin/admin-llm.js +0 -0
- package/web/ui/admin/admin-logs.js +0 -0
- package/web/ui/admin/admin-memory.js +0 -0
- package/web/ui/admin/admin-org.js +0 -0
- package/web/ui/admin/admin-permissions.js +0 -0
- package/web/ui/admin/admin-platforms.js +0 -0
- package/web/ui/admin/admin-sessions.js +0 -0
- package/web/ui/admin/admin-skills.js +0 -0
- package/web/ui/admin/admin-system.js +0 -0
- package/web/ui/admin/admin-tasks.js +0 -0
- package/web/ui/chat/chat.css +0 -0
- package/web/ui/chat/chat.js +0 -0
- package/web/ui/chat/chat_container.html +0 -0
- package/web/ui/chat/chat_main.js +0 -0
- package/web/ui/chat/flow_engine.js +0 -0
- package/web/ui/chat/groupchat.js +0 -0
- package/web/ui/chat/left_sessions.html +0 -0
- package/web/ui/chat/middle_chat.html +0 -0
- package/web/ui/chat/right_agents.html +0 -0
- package/web/ui/index.html +0 -0
- package/worklog-v1.22.md +0 -0
- package/worklog.md +0 -0
|
File without changes
|
package/agents/main_agent.py
CHANGED
|
@@ -45,7 +45,7 @@ class MainAgent(BaseAgent):
|
|
|
45
45
|
|
|
46
46
|
严格以XML格式化输出以下内容,否则解析器无法解析:"""
|
|
47
47
|
|
|
48
|
-
# XML
|
|
48
|
+
# XML 输出格式规范(嵌入 SYSTEM_PROMPT,只出现一次)
|
|
49
49
|
xml_prompt = """
|
|
50
50
|
|
|
51
51
|
<output>
|
|
@@ -118,7 +118,7 @@ GUI桌面 (仅Windows/macOS):
|
|
|
118
118
|
|
|
119
119
|
记忆/通信/媒体:
|
|
120
120
|
- 搜索记忆: myagent-ai memory [--keyword 关键词]
|
|
121
|
-
- Agent间通信: myagent-ai chat --agent
|
|
121
|
+
- Agent间通信: myagent-ai chat --agent <Agent_ID或名称> -m "消息" [-f "文件"]
|
|
122
122
|
- 发送文件给用户: myagent-ai send-file 文件路径 描述
|
|
123
123
|
- 播放音频/视频: myagent-ai playaudio/playvideo --url URL [--title 标题]
|
|
124
124
|
|
|
@@ -756,7 +756,6 @@ GUI桌面 (仅Windows/macOS):
|
|
|
756
756
|
+ self.SYSTEM_PROMPT.split("\n", 1)[1]
|
|
757
757
|
)
|
|
758
758
|
system_content = _prompt_with_placeholder.replace(_CONTEXT_PLACEHOLDER, context_xml)
|
|
759
|
-
system_content = system_content + "\n最后,再检查输出格式,确保满足以下要求:" + self.xml_prompt
|
|
760
759
|
|
|
761
760
|
# Step 3: 构建 LLM 消息(必须包含 role=user,否则 OpenAI 兼容 API 返回 400)
|
|
762
761
|
messages = [Message(role="system", content=system_content)]
|
|
@@ -875,7 +874,13 @@ GUI桌面 (仅Windows/macOS):
|
|
|
875
874
|
break
|
|
876
875
|
|
|
877
876
|
llm_raw = response.content
|
|
877
|
+
_finish_reason = getattr(response, 'finish_reason', '') or ''
|
|
878
878
|
logger.debug(f"[{task_id}] LLM 输出 (前500字): {llm_raw[:500]}")
|
|
879
|
+
if _finish_reason == "length":
|
|
880
|
+
logger.warning(
|
|
881
|
+
f"[{task_id}] LLM 输出被 max_tokens 截断 (finish_reason=length),"
|
|
882
|
+
f"输出长度={len(llm_raw)} 字符"
|
|
883
|
+
)
|
|
879
884
|
|
|
880
885
|
# 保存 LLM 原始输出到会话记忆(用于回溯和审计,key=llm_output 不出现在对话历史中)
|
|
881
886
|
if self.memory:
|
|
@@ -918,57 +923,85 @@ GUI桌面 (仅Windows/macOS):
|
|
|
918
923
|
stream_callback,
|
|
919
924
|
)
|
|
920
925
|
|
|
921
|
-
# Step 4.2: <output> 块完整性检查
|
|
922
|
-
#
|
|
923
|
-
#
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
926
|
+
# Step 4.2: <output> 块完整性检查 + finish_reason 截断检测
|
|
927
|
+
# 统一处理三种异常:
|
|
928
|
+
# A) finish_reason=length → max_tokens 截断
|
|
929
|
+
# B) 缺少 <output> 开始标签
|
|
930
|
+
# C) 缺少 </output> 闭合标签
|
|
931
|
+
_has_output_open = bool(re.search(r"<output[^>]*>", llm_raw, re.IGNORECASE))
|
|
932
|
+
_has_output_close = bool(re.search(r"</output\s*>", llm_raw, re.IGNORECASE))
|
|
933
|
+
_is_truncated = (_finish_reason == "length")
|
|
934
|
+
_block_incomplete = (not _has_output_open or not _has_output_close)
|
|
935
|
+
|
|
936
|
+
if _is_truncated or (_block_incomplete and not parsed.parse_success):
|
|
937
|
+
# 构建诊断信息
|
|
938
|
+
_diag_parts = []
|
|
939
|
+
if _is_truncated:
|
|
940
|
+
_diag_parts.append("finish_reason=length(max_tokens截断)")
|
|
941
|
+
if not _has_output_open:
|
|
942
|
+
_diag_parts.append("缺少<output>开始标签")
|
|
943
|
+
if not _has_output_close and _has_output_open:
|
|
944
|
+
_diag_parts.append("缺少</output>闭合标签")
|
|
945
|
+
_diag_msg = ", ".join(_diag_parts)
|
|
946
|
+
|
|
935
947
|
logger.warning(
|
|
936
|
-
f"[{task_id}]
|
|
937
|
-
f"
|
|
948
|
+
f"[{task_id}] XML 输出异常: {_diag_msg},"
|
|
949
|
+
f"parse_success={parsed.parse_success}, "
|
|
950
|
+
f"输出长度={len(llm_raw)} 字符"
|
|
938
951
|
)
|
|
939
|
-
|
|
952
|
+
|
|
953
|
+
if _xml_correction_retries < 2:
|
|
940
954
|
_xml_correction_retries += 1
|
|
941
|
-
#
|
|
942
|
-
# 防止 reasoning 模型因 max_tokens 截断导致内容完全丢失
|
|
955
|
+
# 尝试从不完整输出中提取已有内容,防止内容完全丢失
|
|
943
956
|
_partial_text = self._try_extract_partial_response(llm_raw)
|
|
944
957
|
if _partial_text:
|
|
945
958
|
logger.info(f"[{task_id}] 从不完整XML中提取到部分回复: {_partial_text[:100]}")
|
|
946
959
|
_v2_reasoning_collected.append(_partial_text)
|
|
947
960
|
_emitted_reasoning_this_iter = True
|
|
948
961
|
await self._emit_v2_event("v2_reasoning", {"content": _partial_text}, stream_callback)
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
962
|
+
|
|
963
|
+
# 根据诊断信息构建精准修正提示词
|
|
964
|
+
if _is_truncated:
|
|
965
|
+
correction_prompt = (
|
|
966
|
+
"你的上一次输出因长度限制被截断,XML块不完整。\n"
|
|
967
|
+
"请在回复中只包含精简的核心内容,避免冗长描述。\n"
|
|
968
|
+
"如果需要执行工具调用,只保留最关键的工具。\n"
|
|
969
|
+
"严格按照 <output>...</output> 格式输出,确保标签完整闭合。\n\n"
|
|
970
|
+
f"你上一次被截断的输出如下(供参考,不要照搬):\n{llm_raw[-2000:]}"
|
|
971
|
+
)
|
|
972
|
+
elif not _has_output_open:
|
|
973
|
+
correction_prompt = (
|
|
974
|
+
"你的输出缺少 <output> 开始标签,解析器无法识别。\n"
|
|
975
|
+
"请严格按照 <output>...</output> 格式重新输出,"
|
|
976
|
+
"确保以 <output> 开头、以 </output> 结尾。\n"
|
|
977
|
+
"不要在 <output> 标签前后输出任何其他文字。\n\n"
|
|
978
|
+
f"你上一次的原始输出如下:\n{llm_raw[-2000:]}"
|
|
979
|
+
)
|
|
980
|
+
else:
|
|
981
|
+
correction_prompt = (
|
|
982
|
+
"你的输出缺少 </output> 闭合标签,XML块不完整,"
|
|
983
|
+
"解析器不会处理不完整的块。\n"
|
|
984
|
+
"请严格按照 <output>...</output> 格式重新输出,"
|
|
985
|
+
"确保所有标签正确闭合。\n\n"
|
|
986
|
+
f"你上一次的原始输出如下:\n{llm_raw[-2000:]}"
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
# 追加到 history 时使用截断版本,防止 history 膨胀
|
|
956
990
|
conversation_history.append(
|
|
957
|
-
Message(role="assistant", content=llm_raw)
|
|
991
|
+
Message(role="assistant", content=llm_raw[-3000:] if len(llm_raw) > 3000 else llm_raw)
|
|
958
992
|
)
|
|
959
993
|
conversation_history.append(
|
|
960
994
|
Message(role="user", content=correction_prompt)
|
|
961
995
|
)
|
|
962
996
|
await self._emit_v2_event(
|
|
963
997
|
"v2_reasoning",
|
|
964
|
-
{"content": "⚠️
|
|
998
|
+
{"content": f"⚠️ 模型输出异常({_diag_msg}),正在自动修正({_xml_correction_retries}/2)..."},
|
|
965
999
|
stream_callback,
|
|
966
1000
|
)
|
|
967
1001
|
continue # 重新进入循环,让 LLM 重新生成
|
|
968
1002
|
else:
|
|
969
|
-
#
|
|
970
|
-
logger.warning(f"[{task_id}] XML
|
|
971
|
-
# [v1.15.73] 保存已积累的内容,避免空回复
|
|
1003
|
+
# 已重试 2 次,强制终止
|
|
1004
|
+
logger.warning(f"[{task_id}] XML输出异常已重试2次仍失败,终止循环: {_diag_msg}")
|
|
972
1005
|
if _v2_reasoning_collected:
|
|
973
1006
|
_fallback_save = "\n".join(_v2_reasoning_collected)
|
|
974
1007
|
if _fallback_save.strip():
|
|
@@ -992,7 +1025,7 @@ GUI桌面 (仅Windows/macOS):
|
|
|
992
1025
|
stream_callback,
|
|
993
1026
|
)
|
|
994
1027
|
break
|
|
995
|
-
elif
|
|
1028
|
+
elif _block_incomplete and parsed.parse_success:
|
|
996
1029
|
# 块不完整但已提取到有效内容,记录日志但正常继续
|
|
997
1030
|
logger.info(
|
|
998
1031
|
f"[{task_id}] <output> 块不完整但已提取到有效内容,跳过修正直接处理"
|
|
@@ -1003,28 +1036,29 @@ GUI桌面 (仅Windows/macOS):
|
|
|
1003
1036
|
# 即使解析失败,如果 regex fallback 提取到了工具调用,仍然继续执行
|
|
1004
1037
|
if parsed.tools_to_call:
|
|
1005
1038
|
logger.warning(f"[{task_id}] XML 解析失败但提取到 {len(parsed.tools_to_call)} 个工具调用,跳过修正直接执行")
|
|
1006
|
-
elif parsed.needs_correction and _xml_correction_retries <
|
|
1039
|
+
elif parsed.needs_correction and _xml_correction_retries < 2:
|
|
1007
1040
|
# XML 完全无法解析,让 LLM 重新格式化输出
|
|
1008
1041
|
_xml_correction_retries += 1
|
|
1009
1042
|
logger.warning(
|
|
1010
1043
|
f"[{task_id}] XML 解析完全失败,回退给 LLM 修正 "
|
|
1011
|
-
f"(重试 {_xml_correction_retries}/
|
|
1044
|
+
f"(重试 {_xml_correction_retries}/2)"
|
|
1012
1045
|
)
|
|
1013
1046
|
correction_prompt = (
|
|
1014
|
-
"你上一次的输出格式有误,XML
|
|
1015
|
-
"请严格按照 <output>...</output>
|
|
1016
|
-
"
|
|
1017
|
-
|
|
1047
|
+
"你上一次的输出格式有误,XML解析器无法识别。\n"
|
|
1048
|
+
"请严格按照 <output>...</output> 格式重新输出你的回答。\n"
|
|
1049
|
+
"注意:以 <output> 开头,以 </output> 结尾,"
|
|
1050
|
+
"不要在 <output> 标签前后输出任何其他文字。\n\n"
|
|
1051
|
+
f"你上一次的原始输出如下:\n{llm_raw[-2000:]}"
|
|
1018
1052
|
)
|
|
1019
1053
|
conversation_history.append(
|
|
1020
|
-
Message(role="assistant", content=llm_raw)
|
|
1054
|
+
Message(role="assistant", content=llm_raw[-3000:] if len(llm_raw) > 3000 else llm_raw)
|
|
1021
1055
|
)
|
|
1022
1056
|
conversation_history.append(
|
|
1023
1057
|
Message(role="user", content=correction_prompt)
|
|
1024
1058
|
)
|
|
1025
1059
|
await self._emit_v2_event(
|
|
1026
1060
|
"v2_reasoning",
|
|
1027
|
-
{"content": "⚠️
|
|
1061
|
+
{"content": f"⚠️ 模型输出格式异常,正在自动修正({_xml_correction_retries}/2)..."},
|
|
1028
1062
|
stream_callback,
|
|
1029
1063
|
)
|
|
1030
1064
|
continue # 重新进入循环,让 LLM 重新生成
|
package/config.py
CHANGED
|
@@ -28,7 +28,7 @@ class LLMConfig:
|
|
|
28
28
|
base_url: str = "https://api.openai.com/v1"
|
|
29
29
|
model: str = "gpt-4"
|
|
30
30
|
temperature: float = 0.1
|
|
31
|
-
max_tokens: int =
|
|
31
|
+
max_tokens: int = 30000
|
|
32
32
|
context_window: int = 128000 # 上下文窗口大小
|
|
33
33
|
input_modes: List[str] = field(default_factory=lambda: ["text"]) # 支持的输入模式
|
|
34
34
|
reasoning: bool = False # 是否支持推理
|
|
@@ -94,7 +94,7 @@ class ModelEntry:
|
|
|
94
94
|
model: str = "" # API 调用使用的实际模型字符串
|
|
95
95
|
base_url: str = "" # 自定义 Base URL(空=使用 provider 默认值)
|
|
96
96
|
api_key: str = "" # 专用 API Key(空=使用全局默认值)
|
|
97
|
-
max_tokens: int =
|
|
97
|
+
max_tokens: int = 30000
|
|
98
98
|
temperature: float = 0.1
|
|
99
99
|
context_window: int = 128000 # 上下文窗口大小(token)
|
|
100
100
|
input_modes: List[str] = field(default_factory=lambda: ["text"]) # 支持的输入模式: text, image, video, audio
|
package/core/llm.py
CHANGED
|
@@ -133,7 +133,7 @@ class LLMClient:
|
|
|
133
133
|
base_url: str = "",
|
|
134
134
|
model: str = "gpt-4",
|
|
135
135
|
temperature: float = 0.1,
|
|
136
|
-
max_tokens: int =
|
|
136
|
+
max_tokens: int = 30000,
|
|
137
137
|
timeout: int = 120,
|
|
138
138
|
max_retries: int = 3,
|
|
139
139
|
reasoning: bool = False,
|
|
@@ -567,13 +567,26 @@ class LLMClient:
|
|
|
567
567
|
"arguments": args,
|
|
568
568
|
})
|
|
569
569
|
|
|
570
|
+
# 提取推理模型的思考过程 (DeepSeek-R1, o1, o3, QwQ 等)
|
|
571
|
+
_reasoning = ""
|
|
572
|
+
_content = choice.message.content or ""
|
|
573
|
+
# 尝试多种属性名(不同 API 提供商的命名差异)
|
|
574
|
+
for _attr in ("reasoning_content", "reasoning", "thinking"):
|
|
575
|
+
_reasoning = getattr(choice.message, _attr, None) or ""
|
|
576
|
+
if _reasoning:
|
|
577
|
+
break
|
|
578
|
+
# 如果 content 为空但 reasoning 有内容,用 reasoning 作为 content
|
|
579
|
+
if not _content.strip() and _reasoning.strip():
|
|
580
|
+
_content = _reasoning
|
|
581
|
+
|
|
570
582
|
return LLMResponse(
|
|
571
|
-
content=
|
|
583
|
+
content=_content,
|
|
572
584
|
tool_calls=tool_calls,
|
|
573
585
|
usage=usage,
|
|
574
586
|
model=response.model,
|
|
575
587
|
finish_reason=choice.finish_reason or "",
|
|
576
588
|
raw_response=response,
|
|
589
|
+
reasoning=_reasoning,
|
|
577
590
|
)
|
|
578
591
|
|
|
579
592
|
async def _chat_anthropic(self, messages: List[Message], kwargs: dict) -> LLMResponse:
|
|
@@ -604,9 +617,16 @@ class LLMClient:
|
|
|
604
617
|
)
|
|
605
618
|
|
|
606
619
|
content = ""
|
|
620
|
+
_reasoning = ""
|
|
607
621
|
for block in response.content:
|
|
608
622
|
if block.type == "text":
|
|
609
623
|
content += block.text
|
|
624
|
+
elif block.type == "thinking":
|
|
625
|
+
_reasoning += getattr(block, "thinking", "") or ""
|
|
626
|
+
|
|
627
|
+
# 如果 content 为空但 reasoning 有内容,用 reasoning 作为 content
|
|
628
|
+
if not content.strip() and _reasoning.strip():
|
|
629
|
+
content = _reasoning
|
|
610
630
|
|
|
611
631
|
return LLMResponse(
|
|
612
632
|
content=content,
|
|
@@ -616,6 +636,7 @@ class LLMClient:
|
|
|
616
636
|
},
|
|
617
637
|
model=response.model,
|
|
618
638
|
finish_reason=response.stop_reason or "",
|
|
639
|
+
reasoning=_reasoning,
|
|
619
640
|
)
|
|
620
641
|
|
|
621
642
|
async def _chat_ollama(self, kwargs: dict) -> LLMResponse:
|
package/core/output_parser.py
CHANGED
|
@@ -429,8 +429,36 @@ def _custom_parse(raw_text: str) -> ParsedOutput:
|
|
|
429
429
|
parsed.needs_correction = True
|
|
430
430
|
return parsed
|
|
431
431
|
|
|
432
|
-
# ── Step 0:
|
|
433
|
-
|
|
432
|
+
# ── Step 0: 检查 <output> 块,处理缺少开始/闭合标签的情况 ──
|
|
433
|
+
_has_open = bool(re.search(r"<output[^>]*>", raw_text, re.IGNORECASE))
|
|
434
|
+
_has_close = bool(re.search(r"</output\s*>", raw_text, re.IGNORECASE))
|
|
435
|
+
|
|
436
|
+
if not _has_open and not _has_close:
|
|
437
|
+
# 完全没有 <output> 标签 — 检查是否包含已知子标签
|
|
438
|
+
_has_known_tags = any(
|
|
439
|
+
re.search(rf"<{re.escape(t)}[\s>]", raw_text, re.IGNORECASE)
|
|
440
|
+
for t in KNOWN_TOP_LEVEL_TAGS
|
|
441
|
+
)
|
|
442
|
+
if _has_known_tags:
|
|
443
|
+
# 有子标签但缺少 <output> 包装 — 自动补全后正常解析
|
|
444
|
+
logger.info(
|
|
445
|
+
"LLM 输出缺少 <output> 标签但包含已知子标签,"
|
|
446
|
+
"自动补全 <output> 包装后解析"
|
|
447
|
+
)
|
|
448
|
+
raw_text = "<output>\n" + raw_text.strip() + "\n</output>"
|
|
449
|
+
parsed.output_block_complete = True
|
|
450
|
+
else:
|
|
451
|
+
parsed.output_block_complete = False
|
|
452
|
+
elif _has_open and not _has_close:
|
|
453
|
+
parsed.output_block_complete = False
|
|
454
|
+
elif not _has_open and _has_close:
|
|
455
|
+
# 有闭合标签但没开始标签 — 补全开始标签
|
|
456
|
+
logger.info("LLM 输出缺少 <output> 开始标签但有 </output>,自动补全")
|
|
457
|
+
raw_text = "<output>\n" + raw_text.strip()
|
|
458
|
+
parsed.output_block_complete = True
|
|
459
|
+
else:
|
|
460
|
+
parsed.output_block_complete = True
|
|
461
|
+
|
|
434
462
|
conservative = not parsed.output_block_complete
|
|
435
463
|
|
|
436
464
|
if conservative:
|
package/package.json
CHANGED
package/scripts/cli.py
CHANGED
|
@@ -1079,7 +1079,7 @@ async def cmd_chat(args):
|
|
|
1079
1079
|
"""Agent间通信 — 向群内其他Agent发送消息或文件"""
|
|
1080
1080
|
import argparse
|
|
1081
1081
|
p = argparse.ArgumentParser(prog="myagent-ai chat", description="向群内其他Agent发送消息或文件,消息会出现在群聊记录中")
|
|
1082
|
-
p.add_argument("--agent", "-a", required=True, help="目标Agent
|
|
1082
|
+
p.add_argument("--agent", "-a", required=True, help="目标Agent的ID或名称(群成员列表中显示)")
|
|
1083
1083
|
p.add_argument("--message", "-m", default="", help="要发送的消息内容")
|
|
1084
1084
|
p.add_argument("--file", "-f", default="", help="要发送的文件路径(可多次使用: -f file1 -f file2)")
|
|
1085
1085
|
p.add_argument("--group", "-g", help="群ID(可选,默认使用最近活跃的群)")
|
|
@@ -1108,24 +1108,30 @@ async def cmd_chat(args):
|
|
|
1108
1108
|
resolved_path = None
|
|
1109
1109
|
found_ids = []
|
|
1110
1110
|
|
|
1111
|
-
#
|
|
1111
|
+
# 优先从数据库查询(支持 ID 或 名称匹配)
|
|
1112
1112
|
if _db_path.exists():
|
|
1113
1113
|
try:
|
|
1114
1114
|
import sqlite3
|
|
1115
1115
|
conn = sqlite3.connect(str(_db_path))
|
|
1116
1116
|
conn.row_factory = sqlite3.Row
|
|
1117
|
-
rows = conn.execute("SELECT path, id FROM agents WHERE id != ''").fetchall()
|
|
1117
|
+
rows = conn.execute("SELECT path, id, name FROM agents WHERE id != ''").fetchall()
|
|
1118
1118
|
conn.close()
|
|
1119
1119
|
for row in rows:
|
|
1120
1120
|
aid = row["id"]
|
|
1121
|
+
aname = row["name"] or ""
|
|
1121
1122
|
found_ids.append(aid)
|
|
1123
|
+
# 按 ID 精确匹配
|
|
1122
1124
|
if aid == a.agent:
|
|
1123
1125
|
resolved_path = row["path"]
|
|
1124
1126
|
break
|
|
1127
|
+
# 按名称精确匹配(兜底)
|
|
1128
|
+
if not resolved_path and aname == a.agent:
|
|
1129
|
+
resolved_path = row["path"]
|
|
1130
|
+
break
|
|
1125
1131
|
except Exception:
|
|
1126
1132
|
pass
|
|
1127
1133
|
|
|
1128
|
-
#
|
|
1134
|
+
# 数据库查不到,回退到文件系统(兼容旧版本,支持 ID 或 名称匹配)
|
|
1129
1135
|
if not resolved_path:
|
|
1130
1136
|
agents_data_dir = _base_dir / "data" / "agents"
|
|
1131
1137
|
if agents_data_dir.exists():
|
|
@@ -1133,11 +1139,15 @@ async def cmd_chat(args):
|
|
|
1133
1139
|
try:
|
|
1134
1140
|
ag_cfg = json.loads(cfg_path.read_text(encoding="utf-8"))
|
|
1135
1141
|
aid = ag_cfg.get("id", "")
|
|
1142
|
+
aname = ag_cfg.get("name", "")
|
|
1136
1143
|
if aid and aid not in found_ids:
|
|
1137
1144
|
found_ids.append(aid)
|
|
1138
1145
|
if aid == a.agent:
|
|
1139
1146
|
resolved_path = cfg_path.parent.relative_to(agents_data_dir).as_posix()
|
|
1140
1147
|
break
|
|
1148
|
+
if not resolved_path and aname and aname == a.agent:
|
|
1149
|
+
resolved_path = cfg_path.parent.relative_to(agents_data_dir).as_posix()
|
|
1150
|
+
break
|
|
1141
1151
|
except Exception:
|
|
1142
1152
|
pass
|
|
1143
1153
|
|
|
@@ -1151,7 +1161,7 @@ async def cmd_chat(args):
|
|
|
1151
1161
|
if cfg_count > 0:
|
|
1152
1162
|
sample = found_ids[:5]
|
|
1153
1163
|
err_parts.append(f"已有 ID: {', '.join(sample)}")
|
|
1154
|
-
err_parts.append(f"(请使用Agent的ID
|
|
1164
|
+
err_parts.append(f"(请使用Agent的ID或名称,从群成员列表中获取)")
|
|
1155
1165
|
print(" | ".join(err_parts), file=sys.stderr)
|
|
1156
1166
|
sys.exit(1)
|
|
1157
1167
|
|
|
@@ -1359,9 +1369,9 @@ GUI (仅 Windows/macOS):
|
|
|
1359
1369
|
myagent-ai memory [--keyword 关键词] [--limit N] 搜索历史记忆
|
|
1360
1370
|
|
|
1361
1371
|
通信:
|
|
1362
|
-
myagent-ai chat --agent
|
|
1363
|
-
myagent-ai chat --agent
|
|
1364
|
-
myagent-ai chat --agent
|
|
1372
|
+
myagent-ai chat --agent <ID或名称> --message "消息" 向其他Agent发送消息
|
|
1373
|
+
myagent-ai chat --agent <ID或名称> --file <文件路径> 向其他Agent发送文件
|
|
1374
|
+
myagent-ai chat --agent <ID或名称> -m "消息" -f <文件> 同时发送消息和文件
|
|
1365
1375
|
|
|
1366
1376
|
压缩解压:
|
|
1367
1377
|
myagent-ai zip <路径1> [路径2] ... [-o 输出.zip] 压缩文件或文件夹
|
package/skills/ASR/LICENSE.txt
CHANGED
|
File without changes
|
package/skills/ASR/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/LLM/LICENSE.txt
CHANGED
|
File without changes
|
package/skills/LLM/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/TTS/LICENSE.txt
CHANGED
|
File without changes
|
package/skills/TTS/SKILL.md
CHANGED
|
File without changes
|
package/skills/TTS/tts.ts
CHANGED
|
File without changes
|
package/skills/VLM/LICENSE.txt
CHANGED
|
File without changes
|
package/skills/VLM/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/base.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/browser_skill.py
CHANGED
|
File without changes
|
|
File without changes
|
package/skills/charts/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/charts/setup.sh
CHANGED
|
File without changes
|
package/skills/chromedev_mcp.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/skills/docx/LICENSE.txt
CHANGED
|
File without changes
|
package/skills/docx/SKILL.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|