minimal-agent 0.9.0 → 0.10.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/README.md +11 -8
- package/package.json +34 -1
- package/plugins/cron-runner/.claude-plugin/plugin.json +5 -0
- package/plugins/cron-runner/commands/cron.md +26 -0
- package/plugins/cron-runner/commands/crons.md +7 -0
- package/plugins/cron-runner/plugin.js +34 -0
- package/plugins/cron-runner/src/commands.js +348 -0
- package/plugins/cron-runner/src/cronTime.js +148 -0
- package/plugins/cron-runner/src/lock.js +68 -0
- package/plugins/cron-runner/src/runs.js +89 -0
- package/plugins/cron-runner/src/scheduleEngine.js +72 -0
- package/plugins/cron-runner/src/scheduler.js +355 -0
- package/plugins/cron-runner/src/schema.js +140 -0
- package/plugins/cron-runner/src/service.js +167 -0
- package/plugins/cron-runner/src/store.js +298 -0
- package/plugins/cron-runner/src/types.js +1 -0
- package/plugins/workflow-runner/commands/workflow.md +4 -4
- package/plugins/workflow-runner/commands/workflows.md +1 -1
- package/plugins/workflow-runner/plugin.js +2 -1
- package/plugins/workflow-runner/src/agentCommon.js +172 -9
- package/plugins/workflow-runner/src/dslManifest.js +72 -0
- package/plugins/workflow-runner/src/expressions.js +150 -13
- package/plugins/workflow-runner/src/index.js +39 -8
- package/plugins/workflow-runner/src/loader.js +216 -64
- package/plugins/workflow-runner/src/multimodal.js +37 -0
- package/plugins/workflow-runner/src/recovery.js +26 -24
- package/plugins/workflow-runner/src/runner.js +693 -287
- package/plugins/workflow-runner/src/stepExecutors/agent.js +126 -37
- package/plugins/workflow-runner/src/stepExecutors/assert.js +3 -2
- package/plugins/workflow-runner/src/stepExecutors/llm.js +38 -30
- package/plugins/workflow-runner/src/stepExecutors/skill.js +27 -38
- package/plugins/workflow-runner/src/stepExecutors/tool.js +56 -3
- package/plugins/workflow-runner/src/stepExecutors/verify.js +19 -10
- package/plugins/workflow-runner/src/taskIdentity.js +185 -30
- package/plugins/workflow-runner/src/types.js +18 -7
- package/plugins/workflow-runner/src/workflowState.js +355 -55
- package/skills/ai-image/SKILL.md +89 -0
- package/skills/ai-image/scripts/generate.mjs +497 -0
- package/skills/ai-image/scripts/generate_from_plan.mjs +469 -0
- package/skills/ai-image/scripts/generate_from_plan_test.mjs +223 -0
- package/skills/ai-image/scripts/generate_test.mjs +74 -0
- package/skills/browser-automation/SKILL.md +47 -0
- package/skills/docx/SKILL.md +25 -3
- package/skills/docx/scripts/office/helpers/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/helpers/__pycache__/merge_runs.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/helpers/__pycache__/simplify_redlines.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/base.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/docx.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/pptx.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/redlining.cpython-314.pyc +0 -0
- package/skills/docx/scripts/opc_check.py +253 -0
- package/skills/image-gen-openrouter/SKILL.md +10 -2
- package/skills/image-stats/SKILL.md +65 -0
- package/skills/image-stats/scripts/__pycache__/image_stats.cpython-314.pyc +0 -0
- package/skills/image-stats/scripts/__pycache__/image_stats_test.cpython-314.pyc +0 -0
- package/skills/image-stats/scripts/image_stats.py +368 -0
- package/skills/image-stats/scripts/image_stats_test.py +181 -0
- package/skills/pptx/SKILL.md +123 -95
- package/skills/pptx/design.md +82 -0
- package/skills/pptx/examples/README.md +29 -0
- package/skills/pptx/examples/hybrid_example.mjs +107 -0
- package/skills/pptx/examples/hybrid_example.pptx +0 -0
- package/skills/pptx/pptxgenjs.md +41 -0
- package/skills/pptx/scripts/deck_helpers.mjs +224 -0
- package/skills/pptx/scripts/layout_lint.py +293 -0
- package/skills/pptx/scripts/layout_lint_test.py +160 -0
- package/skills/pptx/scripts/opc_check.py +339 -0
- package/skills/pptx/scripts/svg_fallback.mjs +145 -0
- package/skills/pptx/svg.md +67 -0
- package/skills/tts-zh/SKILL.md +19 -2
- package/skills/ui-design/SKILL.md +158 -0
- package/skills/ui-design/claude_design.md +309 -0
- package/skills/ui-design/evals/evals.json +254 -0
- package/skills/ui-design/references/aesthetic-direction.md +83 -0
- package/skills/ui-design/references/claude-design-protocol.md +36 -0
- package/skills/ui-design/references/design-context.md +53 -0
- package/skills/ui-design/references/design-execution-playbook.md +82 -0
- package/skills/ui-design/references/export-pptx.md +124 -0
- package/skills/ui-design/references/layout-composition.md +654 -0
- package/skills/ui-design/references/preview-feedback.md +37 -0
- package/skills/ui-design/references/source-image-layout.md +189 -0
- package/skills/ui-design/references/starter-components.md +78 -0
- package/skills/ui-design/references/vi-aegis-vector.md +144 -0
- package/skills/ui-design/references/vi-amber-prism.md +133 -0
- package/skills/ui-design/references/vi-aqua-glass.md +200 -0
- package/skills/ui-design/references/vi-comfort-vision.md +147 -0
- package/skills/ui-design/references/vi-ember-prism.md +140 -0
- package/skills/ui-design/references/vi-nebula-console.md +151 -0
- package/skills/ui-design/references/vi-obsidian-optics.md +139 -0
- package/skills/ui-design/references/vi-obsidian-xui.md +143 -0
- package/skills/ui-design/references/vi-precision-horizon-dark.md +117 -0
- package/skills/ui-design/references/vi-precision-horizon.md +215 -0
- package/skills/ui-design/references/vi-solar-relay.md +130 -0
- package/skills/ui-design/references/vi-template-workflow.md +48 -0
- package/skills/ui-design/references/vi-verdant-grid.md +141 -0
- package/skills/ui-design/references/vi-violet-meridian.md +172 -0
- package/skills/ui-design/scripts/__pycache__/assemble_material.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/assemble_material_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/chart_sanity_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_language_policy.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_ui_artifact.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_ui_artifact_pptx_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_pages_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_pages_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_visual_style_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_visual_style_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_budget_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_budget_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_repair_hints.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_repair_hints_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_style_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_style_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/draft_coverage_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/extract_source_assets.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/extract_source_assets_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/generated_image_review_collect.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/generated_image_review_collect_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_plan_lint.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_plan_lint_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_prompt_rewrite.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_prompt_rewrite_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/layout_balance.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/layout_balance_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/normalize_design_json.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/normalize_design_json_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/plan_source_layout.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/plan_source_layout_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_hint.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_hint_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_input.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_input_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/scaffold_ui_artifact.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/source_usage_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/source_usage_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/text_readability_pixel.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/visual_quality_gate.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/visual_quality_gate_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/assemble_material.py +217 -0
- package/skills/ui-design/scripts/assemble_material_test.py +149 -0
- package/skills/ui-design/scripts/browser_check_ui_artifact.mjs +221 -0
- package/skills/ui-design/scripts/chart_sanity_check.py +261 -0
- package/skills/ui-design/scripts/chart_sanity_check_test.py +165 -0
- package/skills/ui-design/scripts/check_language_policy.py +351 -0
- package/skills/ui-design/scripts/check_ui_artifact.py +435 -0
- package/skills/ui-design/scripts/check_ui_artifact_pptx_test.py +251 -0
- package/skills/ui-design/scripts/deck_pages_check.py +158 -0
- package/skills/ui-design/scripts/deck_pages_check_test.py +134 -0
- package/skills/ui-design/scripts/deck_visual_style_check.py +767 -0
- package/skills/ui-design/scripts/deck_visual_style_check_test.py +713 -0
- package/skills/ui-design/scripts/design_budget_check.py +271 -0
- package/skills/ui-design/scripts/design_budget_check_test.py +183 -0
- package/skills/ui-design/scripts/design_repair_hints.py +162 -0
- package/skills/ui-design/scripts/design_repair_hints_test.py +54 -0
- package/skills/ui-design/scripts/design_style_check.py +397 -0
- package/skills/ui-design/scripts/design_style_check_test.py +233 -0
- package/skills/ui-design/scripts/draft_coverage_check.py +184 -0
- package/skills/ui-design/scripts/draft_coverage_check_test.py +131 -0
- package/skills/ui-design/scripts/export_pptx_from_html.mjs +2367 -0
- package/skills/ui-design/scripts/extract_source_assets.py +607 -0
- package/skills/ui-design/scripts/extract_source_assets_test.py +256 -0
- package/skills/ui-design/scripts/generated_image_review_collect.py +206 -0
- package/skills/ui-design/scripts/generated_image_review_collect_test.py +91 -0
- package/skills/ui-design/scripts/image_plan_lint.py +571 -0
- package/skills/ui-design/scripts/image_plan_lint_test.py +515 -0
- package/skills/ui-design/scripts/image_prompt_rewrite.py +713 -0
- package/skills/ui-design/scripts/image_prompt_rewrite_test.py +966 -0
- package/skills/ui-design/scripts/layout_balance.py +881 -0
- package/skills/ui-design/scripts/layout_balance_test.py +927 -0
- package/skills/ui-design/scripts/normalize_design_json.py +272 -0
- package/skills/ui-design/scripts/normalize_design_json_test.py +119 -0
- package/skills/ui-design/scripts/plan_source_layout.py +1450 -0
- package/skills/ui-design/scripts/plan_source_layout_test.py +1136 -0
- package/skills/ui-design/scripts/resolve_source_input.py +270 -0
- package/skills/ui-design/scripts/resolve_source_input_test.py +98 -0
- package/skills/ui-design/scripts/scaffold_ui_artifact.py +377 -0
- package/skills/ui-design/scripts/source_usage_check.py +581 -0
- package/skills/ui-design/scripts/source_usage_check_test.py +427 -0
- package/skills/ui-design/scripts/text_readability_pixel.py +340 -0
- package/skills/ui-design/scripts/text_readability_pixel_test.py +219 -0
- package/skills/ui-design/scripts/visual_quality_gate.py +301 -0
- package/skills/ui-design/scripts/visual_quality_gate_test.py +233 -0
- package/skills/ui-design/tests/e2e/prompts/deck.md +19 -0
- package/skills/ui-design/tests/e2e/prompts/webpage.md +17 -0
- package/skills/ui-design/tests/e2e/render_check.mjs +101 -0
- package/skills/ui-design/tests/e2e/rubric.json +54 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/language-check.txt +12 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/static-check.txt +15 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/outputs/index.html +837 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/review.md +21 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/outputs/homepage.html +373 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/outputs/platform.html +378 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/outputs/index.html +656 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/render_check.mjs +67 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/outputs/index.html +587 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/review.md +36 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/language-check.txt +8 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/static-check.txt +16 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/outputs/index.html +739 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/prompt.md +11 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/review.md +22 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/checks/browser-check.json +52 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/outputs/index.html +641 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/outputs/index.html +467 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/outputs/homepage.html +373 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/outputs/platform.html +378 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/language-check.txt +4 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/execution_notes.md +10 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/outputs/index.html +587 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/prompt.md +14 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/review.md +13 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/checks/browser-check.json +24 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/execution_notes.md +21 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/outputs/deck.html +451 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/screenshots/slide-01.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/screenshots/slide-02.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/review.md +79 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/checks/browser-check.json +26 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/execution_notes.md +20 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/outputs/index.html +534 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/browser-check.json +64 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/language-check.txt +7 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/static-console.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/static-homepage.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/outputs/console.html +600 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/outputs/homepage.html +556 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/prompt.md +29 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/review.md +57 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/console-desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/console-mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/homepage-desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/homepage-mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/browser-check.json +33 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/language-check.txt +6 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/outputs/index.html +682 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/review.md +59 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/outputs/page-01.html +466 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/outputs/page-02.html +433 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/language-check.txt +3 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/execution_notes.md +24 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/outputs/index.html +723 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/prompt.md +15 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/browser-dark.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/browser-light.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/language-check.txt +11 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/static-dark.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/static-light.txt +3 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/execution_notes.md +23 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/outputs/dark.html +392 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/outputs/light.html +476 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/prompt.md +23 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/review.md +41 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/dark/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/dark/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/light/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/light/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/browser-check.json +54 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/language-check.txt +5 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/outputs/index.html +765 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/prompt.md +15 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/review.md +59 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/outputs/index.html +508 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/browser-check.json +54 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/language-check.txt +6 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/outputs/index.html +788 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/prompt.md +14 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/review.md +60 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/screenshots/mobile.png +0 -0
- package/skills/video-compose/SKILL.md +8 -1
- package/skills/web-crawler/SKILL.md +70 -0
- package/skills/web-crawler/scripts/crawl.mjs +538 -0
- package/skills/web-crawler/scripts/crawl.test.mjs +204 -0
- package/skills/xlsx/SKILL.md +12 -0
- package/skills/xlsx/scripts/opc_check.py +253 -0
- package/src/advisorState.js +22 -0
- package/src/askBridge.js +87 -3
- package/src/bootstrap/workingDir.js +12 -1
- package/src/cli/args.js +17 -1
- package/src/cli/configMenu.js +236 -0
- package/src/cli/configWizard.js +7 -5
- package/src/cli/print.js +37 -4
- package/src/cli/streamJson.js +77 -24
- package/src/cli/wizards/advisorWizard.js +147 -0
- package/src/cli/wizards/fieldForm.js +149 -0
- package/src/cli/wizards/imageWizard.js +60 -0
- package/src/cli/wizards/openRouterWizard.js +23 -0
- package/src/cli/wizards/providerPresets.js +95 -0
- package/src/cli/wizards/providerWizard.js +219 -0
- package/src/cli/wizards/searchWizard.js +23 -0
- package/src/cli/wizards/ttsWizard.js +34 -0
- package/src/config/configFile.js +441 -83
- package/src/config/configService.js +446 -0
- package/src/config.js +24 -64
- package/src/context/agentHome.js +9 -0
- package/src/context/archive.js +3 -2
- package/src/context/compact.js +8 -5
- package/src/context/contextLock.js +81 -0
- package/src/context/persistContext.js +30 -11
- package/src/context/reactiveCompact.js +4 -2
- package/src/context/recentDirs.js +21 -61
- package/src/context/sessionPath.js +97 -23
- package/src/context/sessionRegistry.js +303 -24
- package/src/context/tokenCounter.js +18 -0
- package/src/context/workspaceIndex.js +731 -0
- package/src/infra/verification.js +3 -2
- package/src/llm/client.js +293 -206
- package/src/llm/providers/anthropicFormat.js +241 -0
- package/src/llm/providers/openaiFormat.js +190 -0
- package/src/loop.js +211 -27
- package/src/main.js +61 -11
- package/src/messageQueue.js +97 -0
- package/src/multimodal.js +203 -0
- package/src/plugin-sdk.js +15 -0
- package/src/plugins/commandRouter.js +3 -0
- package/src/plugins/hookEngine.js +5 -1
- package/src/plugins/pluginLifecycle.js +28 -0
- package/src/plugins/pluginRunner.js +40 -0
- package/src/plugins/transcript.js +4 -3
- package/src/prompts/pluginList.js +2 -2
- package/src/prompts/projectInstructions.js +3 -3
- package/src/prompts/promptAssembly.js +133 -109
- package/src/prompts/skillList.js +12 -22
- package/src/session/runAgentTurn.js +70 -0
- package/src/session/runTurn.js +41 -6
- package/src/toolGate.js +17 -0
- package/src/tools/advisor/advisor.js +379 -0
- package/src/tools/agent/agent.js +555 -0
- package/src/tools/agent/agentTypes.js +59 -0
- package/src/tools/agent/coordinator.js +93 -0
- package/src/tools/agent/worktree.js +270 -0
- package/src/tools/ask/ask.js +7 -2
- package/src/tools/bash/bash.js +112 -18
- package/src/tools/download/download.js +144 -0
- package/src/tools/edit/edit.js +1 -0
- package/src/tools/edit/multi-edit.js +1 -0
- package/src/tools/genimage/genimage.js +242 -0
- package/src/tools/genspeech/genspeech.js +67 -0
- package/src/tools/glob/glob.js +1 -0
- package/src/tools/grep/grep.js +3 -0
- package/src/tools/grep/rgPath.js +2 -0
- package/src/tools/index.js +25 -2
- package/src/tools/read/read.js +1 -0
- package/src/tools/shared/killTree.js +52 -0
- package/src/tools/toolProgressBridge.js +48 -0
- package/src/tools/webbrowser/agentBrowserPath.js +258 -0
- package/src/tools/webbrowser/browser.js +59 -42
- package/src/tools/webbrowser/browserControl.js +118 -0
- package/src/tools/webbrowser/browserDaemon.js +97 -0
- package/src/tools/webbrowser/browserService.js +27 -0
- package/src/tools/webbrowser/browserStream.js +119 -0
- package/src/tools/webbrowser/webbrowser.js +699 -130
- package/src/tools/webfetch/webfetch.js +1 -0
- package/src/tools/websearch/websearch.js +134 -51
- package/src/tools/write/write.js +1 -0
- package/src/ui/App.js +249 -22
- package/src/ui/AskQuestion.js +19 -17
- package/src/ui/InputBox.js +34 -9
- package/src/ui/LiveArea.js +112 -19
- package/src/ui/MessageList.js +100 -14
- package/src/ui/ModelPicker.js +56 -0
- package/src/ui/QueuedMessagesBanner.js +14 -0
- package/src/ui/Root.js +18 -10
- package/src/ui/SessionPicker.js +102 -0
- package/src/ui/StatusLine.js +13 -4
- package/src/ui/WorkspacePicker.js +55 -0
- package/src/ui/figures.js +44 -0
- package/src/ui/hooks/askSlot.js +82 -0
- package/src/ui/hooks/useChat.js +345 -64
- package/src/ui/hooks/usePasteHandler.js +11 -1
- package/src/ui/hooks/useTextBuffer.js +1 -3
- package/src/ui/liveViewport.js +5 -1
- package/src/ui/markdown.js +206 -0
- package/src/ui/textBuffer.js +0 -7
- package/src/ui/theme.js +32 -0
- package/src/utils/debugLog.js +0 -4
- package/src/utils/resourcePaths.js +2 -2
- package/src/utils/stripThink.js +50 -0
- package/src/web/browserBridge.js +447 -0
- package/src/web/protocol.js +19 -0
- package/workflows/adaptive-research.yaml +9 -2
- package/workflows/book-review-short.yaml +31 -7
- package/workflows/e2e-write-greet.yaml +3 -0
- package/workflows/illustrate.yaml +227 -0
- package/workflows/plan.yaml +437 -207
- package/workflows/ppt.yaml +1659 -0
- package/workflows/ralph-loop.yaml +142 -112
- package/workflows/schema.json +81 -23
- package/workflows/webppt.yaml +496 -0
- package/workflows/word.yaml +710 -0
- package/workflows/youtube-shorts.yaml +38 -10
- package/MINIMAL-TRACE.md +0 -77
- package/plugins/workflow-runner/src/voteHelpers.js +0 -110
- package/skills/config/SKILL.md +0 -123
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/pptx/scripts/office/__pycache__/soffice.cpython-314.pyc +0 -0
- package/src/ui/ProgressPanel.js +0 -54
- package/src/ui/StreamingBlock.js +0 -11
- package/src/ui/ToolStatus.js +0 -11
|
@@ -7,32 +7,40 @@ description: |
|
|
|
7
7
|
去做任意视频流水线(横屏长视频、广告片、教程片都行)。
|
|
8
8
|
version: "0.1"
|
|
9
9
|
|
|
10
|
+
# 声明产物:new-task 启动清理残留 / completed 报实际产物 / 同任务 resume 重写不被
|
|
11
|
+
# 内核「覆盖前先 Read」守卫挡(见 CLAUDE.md 任务身份语义)
|
|
12
|
+
artifacts:
|
|
13
|
+
- "./assets/script.json"
|
|
14
|
+
- "./out/shorts.mp4"
|
|
15
|
+
|
|
10
16
|
inputs:
|
|
11
17
|
- name: topic
|
|
12
18
|
type: string
|
|
13
19
|
required: true
|
|
14
|
-
|
|
20
|
+
greedy: true
|
|
21
|
+
description: "视频主题(中文,可一句话自然语言;命令行整句进 topic,不被空格拆碎)"
|
|
15
22
|
- name: openrouter_key
|
|
16
23
|
type: string
|
|
17
24
|
required: false
|
|
18
|
-
description: "OpenRouter API key;不填则用 OPENROUTER_API_KEY 环境变量"
|
|
25
|
+
description: "【高级·用 --input openrouter_key=...】OpenRouter API key;不填则用 OPENROUTER_API_KEY 环境变量"
|
|
19
26
|
- name: aspect
|
|
20
27
|
type: enum
|
|
21
28
|
values: ["9:16", "16:9", "1:1", "4:5"]
|
|
22
29
|
default: "9:16"
|
|
23
|
-
description: "
|
|
30
|
+
description: "【高级·用 --input aspect=...】图片与视频宽高比"
|
|
24
31
|
- name: width
|
|
25
32
|
type: number
|
|
26
33
|
default: 1080
|
|
27
|
-
description: "
|
|
34
|
+
description: "【高级·用 --input width=N】视频输出宽度"
|
|
28
35
|
- name: height
|
|
29
36
|
type: number
|
|
30
37
|
default: 1920
|
|
31
|
-
description: "
|
|
38
|
+
description: "【高级·用 --input height=N】视频输出高度"
|
|
32
39
|
|
|
33
40
|
steps:
|
|
34
41
|
# ---------- 1. 用 LLM 写 5 幕脚本(强制 5 幕以便后续 loop 用静态数组) ----------
|
|
35
42
|
- id: write_script
|
|
43
|
+
title: "1/11·写五幕脚本"
|
|
36
44
|
llm: |
|
|
37
45
|
你是短视频文案策划。请为主题"${inputs.topic}"写一个 **正好 5 幕** 的竖屏短视频。
|
|
38
46
|
每一幕包含:
|
|
@@ -48,13 +56,17 @@ steps:
|
|
|
48
56
|
|
|
49
57
|
# ---------- 2. 把 LLM 输出落盘为 script.json ----------
|
|
50
58
|
- id: write_script_json
|
|
59
|
+
title: "2/11·脚本落盘 script.json"
|
|
51
60
|
tool: Write
|
|
61
|
+
artifacts:
|
|
62
|
+
- "./assets/script.json"
|
|
52
63
|
args:
|
|
53
64
|
file_path: "./assets/script.json"
|
|
54
65
|
content: "${script_json_text}"
|
|
55
66
|
|
|
56
67
|
# ---------- 3. 解析 script.json,拆出 prompts.txt / narrations.txt(每行一个) ----------
|
|
57
68
|
- id: parse_script
|
|
69
|
+
title: "3/11·解析脚本拆分文案"
|
|
58
70
|
tool: Bash
|
|
59
71
|
args:
|
|
60
72
|
command: |
|
|
@@ -69,6 +81,7 @@ steps:
|
|
|
69
81
|
content: parse_log
|
|
70
82
|
|
|
71
83
|
- id: assert_script_parsed
|
|
84
|
+
title: "4/11·校验脚本拆分产物"
|
|
72
85
|
type: verify
|
|
73
86
|
checks:
|
|
74
87
|
- 'file_exists:./assets/prompts.txt'
|
|
@@ -76,39 +89,49 @@ steps:
|
|
|
76
89
|
onFail: "脚本解析失败:./assets/prompts.txt 或 ./assets/narrations.txt 不存在"
|
|
77
90
|
|
|
78
91
|
# ---------- 4. 生成 5 张配图(loop 静态数组 + 每轮先读对应一行 prompt) ----------
|
|
92
|
+
# ⚠️ Bash 引号 footgun:${i} 是引擎插值(shell 之前发生)。曾写 1 基算术
|
|
93
|
+
# `sed -n '$((${i}+1))p'`——shell 单引号内不做算术展开,sed 收到字面 $((0+1))p
|
|
94
|
+
# 直接报错。正解:loop 直接用 1 基序号,sed 行号即 ${i}。
|
|
79
95
|
- id: gen_images
|
|
96
|
+
title: "5/11·生成五张配图"
|
|
80
97
|
type: loop
|
|
81
|
-
over: "[
|
|
98
|
+
over: "[1, 2, 3, 4, 5]"
|
|
82
99
|
as: i
|
|
83
100
|
do:
|
|
84
101
|
- id: read_prompt
|
|
102
|
+
title: "读第 ${i} 行画面提示词"
|
|
85
103
|
tool: Bash
|
|
86
104
|
args:
|
|
87
|
-
command:
|
|
105
|
+
command: 'sed -n "${i}p" ./assets/prompts.txt'
|
|
88
106
|
capture:
|
|
89
107
|
content: prompt_text
|
|
90
108
|
- id: gen_one_image
|
|
109
|
+
title: "生成第 ${i} 张配图"
|
|
91
110
|
skill: image-gen-openrouter
|
|
92
111
|
input: 'prompt=${prompt_text} output=./assets/img_${i}.png aspect=${inputs.aspect} key=${inputs.openrouter_key}'
|
|
93
112
|
|
|
94
|
-
# ---------- 5. 生成 5 段 TTS
|
|
113
|
+
# ---------- 5. 生成 5 段 TTS 音频(1 基序号,理由同 gen_images) ----------
|
|
95
114
|
- id: gen_audio
|
|
115
|
+
title: "6/11·生成五段配音"
|
|
96
116
|
type: loop
|
|
97
|
-
over: "[
|
|
117
|
+
over: "[1, 2, 3, 4, 5]"
|
|
98
118
|
as: i
|
|
99
119
|
do:
|
|
100
120
|
- id: read_narration
|
|
121
|
+
title: "读第 ${i} 句旁白"
|
|
101
122
|
tool: Bash
|
|
102
123
|
args:
|
|
103
|
-
command:
|
|
124
|
+
command: 'sed -n "${i}p" ./assets/narrations.txt'
|
|
104
125
|
capture:
|
|
105
126
|
content: narration_text
|
|
106
127
|
- id: gen_one_tts
|
|
128
|
+
title: "合成第 ${i} 段语音"
|
|
107
129
|
skill: tts-zh
|
|
108
130
|
input: 'text=${narration_text} output=./assets/audio_${i}.mp3'
|
|
109
131
|
|
|
110
132
|
# ---------- 6. 探测各段音频时长,逗号串联 ----------
|
|
111
133
|
- id: probe_durations
|
|
134
|
+
title: "7/11·探测音频时长"
|
|
112
135
|
tool: Bash
|
|
113
136
|
args:
|
|
114
137
|
command: |
|
|
@@ -121,6 +144,7 @@ steps:
|
|
|
121
144
|
|
|
122
145
|
# ---------- 7. 合并所有 TTS 段成一条音轨 ----------
|
|
123
146
|
- id: merge_audio
|
|
147
|
+
title: "8/11·合并音轨"
|
|
124
148
|
tool: Bash
|
|
125
149
|
args:
|
|
126
150
|
command: |
|
|
@@ -135,6 +159,7 @@ steps:
|
|
|
135
159
|
|
|
136
160
|
# ---------- 8. 读 narrations_json(前面 parse_script 已写好),作 SRT 文本输入 ----------
|
|
137
161
|
- id: read_narrations_json
|
|
162
|
+
title: "9/11·读取旁白清单"
|
|
138
163
|
tool: Read
|
|
139
164
|
args:
|
|
140
165
|
file_path: "./assets/narrations_json.txt"
|
|
@@ -143,16 +168,19 @@ steps:
|
|
|
143
168
|
|
|
144
169
|
# ---------- 9. 生成 SRT 字幕 ----------
|
|
145
170
|
- id: make_srt
|
|
171
|
+
title: "10/11·生成字幕"
|
|
146
172
|
skill: subtitle-srt
|
|
147
173
|
input: 'texts=${narrations_json} durations=${durations} output=./assets/subs.srt'
|
|
148
174
|
|
|
149
175
|
# ---------- 10. 合成最终 mp4 ----------
|
|
150
176
|
- id: compose_video
|
|
177
|
+
title: "11/11·合成最终视频"
|
|
151
178
|
skill: video-compose
|
|
152
179
|
input: 'images_glob=./assets/img_*.png audio=./assets/audio.mp3 srt=./assets/subs.srt output=./out/shorts.mp4 width=${inputs.width} height=${inputs.height}'
|
|
153
180
|
|
|
154
181
|
# ---------- 11. 守门 verify(升级自 assert) ----------
|
|
155
182
|
- id: verify_output
|
|
183
|
+
title: "完成·守门校验"
|
|
156
184
|
type: verify
|
|
157
185
|
checks:
|
|
158
186
|
- 'file_exists:./out/shorts.mp4'
|
package/MINIMAL-TRACE.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# MINIMAL-TRACE —— 用最短路径读懂 agent 主循环
|
|
2
|
-
|
|
3
|
-
> 教学导读。本项目首要目标是「讲透一个 agent 从输入 → 工具循环 → 落盘」。
|
|
4
|
-
> 但 `src/loop.ts` 已含不少**生产硬化**(4 种压缩 / 反应式自救 / 并行事件队列 / 截断警告…),
|
|
5
|
-
> 初学者直接读会被淹没。这篇带你**第一遍只看主干**,把硬化层全部圈出来跳过。
|
|
6
|
-
|
|
7
|
-
## 一句话本质
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
用户输入 → 调 LLM → LLM 想调工具就执行 → 结果喂回 → 再调 LLM → … → 不调工具了,输出最终回答
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
整个 agent 就是这个循环。它写在 `src/loop.ts::runQuery`(一个 `async function*`,逐步 `yield` 事件给 UI)。
|
|
14
|
-
|
|
15
|
-
## 最小可读路径(第一遍只看这 6 步)
|
|
16
|
-
|
|
17
|
-
打开 `src/loop.ts`,找到 `runQuery`,顺着看这几段——**只看主干,遇到下面「进阶层」列出的东西先跳过**:
|
|
18
|
-
|
|
19
|
-
1. **用户消息入栈**:把 `{ role:'user', content: userInput }` push 进 `history`,`yield` 一个 `user_message_committed` 让 UI 先把它显示出来。`history` 是一个会被原地 mutate 的数组(调用方和 loop 共享同一引用)。
|
|
20
|
-
|
|
21
|
-
2. **进入 `while (turn < maxTurns)`**:每一轮 = 一次「调 LLM(可能带工具)」。`maxTurns`(默认 50)是失控保护。
|
|
22
|
-
|
|
23
|
-
3. **调 LLM、把流式响应拼成一条 assistant 消息**:`for await (const ev of chat({...}))` 逐块消费——`text_delta` 累积成答案文本并 `yield {type:'text'}`;`tool_call_delta` 累积成工具调用(OpenAI 协议下工具调用也是分片返回的,用 `mergeToolCallDelta` 合并)。循环结束后组装出 `assistantMsg` 推入 `history`、`yield assistant_message`。
|
|
24
|
-
|
|
25
|
-
4. **没有工具调用 → 这一轮就是最终回答,结束**:`if (toolCallsByIndex.length === 0)` → `yield {type:'turn_done'}` 然后 `return`。这是循环的正常出口。
|
|
26
|
-
|
|
27
|
-
5. **有工具调用 → 逐个执行、把结果按顺序回填 `history`**:对每个工具调用,`yield tool_start` → 调 `executeToolFn(name, argsJson, signal)` → `yield tool_end`,再把结果作为 `{ role:'tool', tool_call_id }` 消息 push 回 `history`。**关键**:tool 消息必须严格按 assistant 的 `tool_calls` 顺序回填(OpenAI 协议要求一一对应)。
|
|
28
|
-
|
|
29
|
-
6. **回到 `while` 顶部继续下一轮**:模型这次能看到上一轮的工具结果,于是接着推理——要么再调工具,要么给出最终答案(回到第 4 步出口)。
|
|
30
|
-
|
|
31
|
-
读完这 6 步,你就掌握了 agent 的全部本质。下面的都是「让它在生产环境不出岔子」的加固,第一遍可以完全不看。
|
|
32
|
-
|
|
33
|
-
## 进阶层(第一遍请跳过)
|
|
34
|
-
|
|
35
|
-
这些都是 `runQuery` 里为了**健壮/体验**加的料,每个解决一个具体问题,但都不影响你理解主循环:
|
|
36
|
-
|
|
37
|
-
| 你会看到 | 它解决什么 | 第一遍 |
|
|
38
|
-
|---|---|---|
|
|
39
|
-
| `autoCompactIfNeeded`(每轮开头) | 上下文快撑爆时,把旧对话压成摘要,防止超 contextWindow | 跳过 |
|
|
40
|
-
| `reactiveCompactIfApplicable`(catch 里) | 真撞上 prompt-too-long 时,压缩历史后**同轮重发**自救 | 跳过 |
|
|
41
|
-
| `snipCompactIfNeeded`(压缩失败兜底) | 连压缩都失败时,硬砍最老消息释放空间再继续 | 跳过 |
|
|
42
|
-
| `microCompact`(回填 tool 结果时) | 把单个超长工具输出就地压短,省 token | 跳过 |
|
|
43
|
-
| `allConcurrencySafe` 分支 + 事件队列 | 本轮工具**全是只读**才并行执行,否则串行(杜绝并行写同一文件) | 跳过 |
|
|
44
|
-
| `lastFinishReason === 'length'` 警告 | 模型答案被 max_tokens 截断时提醒用户「这是半截」 | 跳过 |
|
|
45
|
-
| `reasoningContent / reasoning / reasoning_details` | 累积思维链(DeepSeek-R1 / MiniMax 等),下一轮原样回传防「失忆」 | 跳过 |
|
|
46
|
-
| `error` 事件的 `code`(llm_error / max_turns / …) | 让 `-p --output-format json` 把终结原因映射成稳定的 stop_reason(给宿主 spawn 用) | 跳过 |
|
|
47
|
-
| `options.chat` / `options.executeTool` | 依赖注入:测试时传 stub,零进程污染;生产走真实模块单例 | 跳过 |
|
|
48
|
-
|
|
49
|
-
## 时序图(主干)
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
用户输入
|
|
53
|
-
│
|
|
54
|
-
▼
|
|
55
|
-
runQuery ──push user 消息──► history
|
|
56
|
-
│
|
|
57
|
-
├─◄─────────────────────────┐ (每轮 turn)
|
|
58
|
-
▼ │
|
|
59
|
-
chat(LLM) ──流式 text / tool_call──► 拼成 assistant 消息 → history
|
|
60
|
-
│ │
|
|
61
|
-
├── 无 tool_calls ──► turn_done ──► return(最终回答)
|
|
62
|
-
│ │
|
|
63
|
-
└── 有 tool_calls │
|
|
64
|
-
│ │
|
|
65
|
-
▼ │
|
|
66
|
-
executeTool ×N ──► tool 结果 → history ──┘(回到下一轮,模型看到结果再推理)
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## 延伸阅读(按需,第几步用到再看)
|
|
70
|
-
|
|
71
|
-
- **`src/types.ts`** —— 类型字典。先看 `Message`(4 种 role)、`ToolCall`、`LlmStreamEvent`(LLM 流式块)、`LoopEvent`(loop 给 UI 的事件)。读主循环前先扫一遍这四个就够。
|
|
72
|
-
- **`src/llm/client.ts`** —— `chat()` 的实现:把 provider 的 SSE 流解析成 `LlmStreamEvent`。对应主干第 3 步。
|
|
73
|
-
- **`src/tools/index.ts`** —— `ALL_TOOLS`(工具清单)+ `executeTool()`:参数防线(JSON.parse → Zod 校验 → 调 `tool.call()`,**工具失败不抛异常**,把 error 喂回 LLM 让它重试)。对应主干第 5 步。
|
|
74
|
-
- **`src/context/compact.ts`** —— 自动压缩入口(进阶层)。想搞懂「上下文怎么不撑爆」再看。
|
|
75
|
-
- **`src/loop.ts`** —— 主角本身。读完本文按上面 6 步对照源码,再回头看进阶层。
|
|
76
|
-
|
|
77
|
-
> 一句话给初学者:**先把 6 步主干跑通,把进阶层当黑盒**;等你能复述「输入怎么变成最终回答」了,再一个个揭开硬化层——每揭开一个,你就多懂一点「为什么生产级 agent 不只是一个 while 循环」。
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ============================================================
|
|
3
|
-
* voteHelpers.ts —— vote 节点的 voter 调用辅助
|
|
4
|
-
* ------------------------------------------------------------
|
|
5
|
-
* 对抗式审查:N 个 voter 跑同一 prompt + refuted: boolean 反向投票。
|
|
6
|
-
* 策略上倾向 refuted=true(找漏洞),所以阈值算的是"驳回票数"。
|
|
7
|
-
* 详见 ADR-05。
|
|
8
|
-
* ============================================================
|
|
9
|
-
*/
|
|
10
|
-
import { execLlmStep } from './stepExecutors/llm.js';
|
|
11
|
-
/** voter 输出 schema(内置,不接受用户自定义) */
|
|
12
|
-
export const VERDICT_SCHEMA = {
|
|
13
|
-
type: 'object',
|
|
14
|
-
additionalProperties: false,
|
|
15
|
-
required: ['refuted', 'reasoning'],
|
|
16
|
-
properties: {
|
|
17
|
-
refuted: { type: 'boolean', description: '是否驳回此 finding' },
|
|
18
|
-
reasoning: { type: 'string', description: '核心论证(≤200 字)' },
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
export function buildVoterPrompt(rules, item) {
|
|
22
|
-
const itemStr = typeof item === 'string' ? item : JSON.stringify(item, null, 2);
|
|
23
|
-
return `你是一个对抗式审查者,你的核心任务是积极找出下面这个 finding 的逻辑漏洞、证据不足、或论证它是伪命题。
|
|
24
|
-
|
|
25
|
-
**被审查的 finding**:
|
|
26
|
-
${itemStr}
|
|
27
|
-
|
|
28
|
-
**审查规则**:
|
|
29
|
-
${rules}
|
|
30
|
-
|
|
31
|
-
**重要心理学定位**:你应当倾向于 refuted=true。只在你**找不到任何合理的反驳角度**且这个 finding 论证扎实时,才输出 refuted=false。"老好人式赞同"是错误的。
|
|
32
|
-
|
|
33
|
-
输出 JSON,refuted=true 表示你成功找到反驳理由,false 表示你认为它确实成立。reasoning 字段写明你的核心论证(≤200 字)。`;
|
|
34
|
-
}
|
|
35
|
-
/** 单个 voter 调用。包装 execLlmStep,强制 VERDICT_SCHEMA + 对抗式 prompt。
|
|
36
|
-
* 解析失败时默认 refuted=false(保守保留 item,避免 LLM 失误导致正确 finding 被误删)。 */
|
|
37
|
-
export async function runVoter(rules, item, vars, ctx) {
|
|
38
|
-
const virtualStep = {
|
|
39
|
-
id: 'vote_voter', // 仅 ID,不影响事件流
|
|
40
|
-
llm: buildVoterPrompt(rules, item),
|
|
41
|
-
output_schema: VERDICT_SCHEMA,
|
|
42
|
-
};
|
|
43
|
-
try {
|
|
44
|
-
// execLlmStep 现为 AsyncGenerator:手动 drain 取 return 值。voter 必须静默——
|
|
45
|
-
// N 个 voter 在 Promise.all 里并行,若把它们的 text 事件向上转发会在 UI 互相打架。
|
|
46
|
-
const gen = execLlmStep(virtualStep, vars, ctx);
|
|
47
|
-
let res = await gen.next();
|
|
48
|
-
while (!res.done)
|
|
49
|
-
res = await gen.next();
|
|
50
|
-
const result = res.value;
|
|
51
|
-
const verdict = extractVerdict(result.raw);
|
|
52
|
-
if (verdict)
|
|
53
|
-
return verdict;
|
|
54
|
-
return { refuted: false, reasoning: '(voter 输出格式异常,保守保留)' };
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
return {
|
|
58
|
-
refuted: false,
|
|
59
|
-
reasoning: `(voter 调用失败: ${e.message},保守保留)`,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* 从 execLlmStep 的 raw 提取 { refuted, reasoning }:
|
|
65
|
-
* 1. raw 直接含字段(B 改完 llm.ts 串通 output_schema 后的形态)
|
|
66
|
-
* 2. raw.text / raw.result 是 JSON 字符串,parse 后含字段(B 未改完时的 fallback)
|
|
67
|
-
* 3. raw.text / raw.result 含 ```json fenced block,剥壳后含字段
|
|
68
|
-
* 4. 其余 → null
|
|
69
|
-
*/
|
|
70
|
-
function extractVerdict(raw) {
|
|
71
|
-
if (typeof raw.refuted === 'boolean' &&
|
|
72
|
-
typeof raw.reasoning === 'string') {
|
|
73
|
-
return { refuted: raw.refuted, reasoning: raw.reasoning };
|
|
74
|
-
}
|
|
75
|
-
for (const k of ['text', 'result']) {
|
|
76
|
-
const v = raw[k];
|
|
77
|
-
if (typeof v !== 'string' || v.length === 0)
|
|
78
|
-
continue;
|
|
79
|
-
const parsed = tryParseJsonLike(v);
|
|
80
|
-
if (parsed &&
|
|
81
|
-
typeof parsed === 'object' &&
|
|
82
|
-
typeof parsed.refuted === 'boolean' &&
|
|
83
|
-
typeof parsed.reasoning === 'string') {
|
|
84
|
-
return {
|
|
85
|
-
refuted: parsed.refuted,
|
|
86
|
-
reasoning: parsed.reasoning,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
function tryParseJsonLike(s) {
|
|
93
|
-
// 1. 直接 JSON
|
|
94
|
-
try {
|
|
95
|
-
return JSON.parse(s);
|
|
96
|
-
}
|
|
97
|
-
catch {
|
|
98
|
-
// 2. 剥 ```json ... ``` 围栏
|
|
99
|
-
const fence = s.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
100
|
-
if (fence) {
|
|
101
|
-
try {
|
|
102
|
-
return JSON.parse(fence[1].trim());
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
package/skills/config/SKILL.md
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: config
|
|
3
|
-
description: 配置向导技能。当用户输入 "/config" 且没有任何其他内容时触发。用于重新配置 LLM provider(BASE_URL / API_KEY / MODEL)。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Config Skill
|
|
7
|
-
|
|
8
|
-
当用户**只输入 `/config`** 时(不带任何其他内容)触发,引导用户重新配置 LLM provider。
|
|
9
|
-
|
|
10
|
-
使用 Read 读现有配置(如有),逐项询问用户新值(允许保留旧值),最后用 Write 工具写入 `~/.minimal-agent/config.json`,并提示用户重启 minimal-agent 使新配置生效。
|
|
11
|
-
|
|
12
|
-
⚠️ 重要:本技能仅在用户**精确输入 `/config`**(前后无任何其他文字)时触发。如果用户的消息里包含其他内容(例如 "/config 帮我看下"、"我想 /config 一下"),不要触发,按普通对话回应。
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## 执行步骤
|
|
17
|
-
|
|
18
|
-
### Step 1: 读取现有配置
|
|
19
|
-
|
|
20
|
-
调用 Read 工具:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
Read({ file_path: "~/.minimal-agent/config.json" })
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
- 文件存在 → 解析 JSON,记住当前的 `baseURL` / `apiKey` / `model` / `provider` / `contextWindow` 字段
|
|
27
|
-
- 文件不存在 → 这是首次手动配置,所有字段都是空
|
|
28
|
-
|
|
29
|
-
⚠️ 注意:用户的 home 目录路径需要展开(`~` → 实际路径)。Read 工具会自动处理,但若失败,尝试用 `process.env.HOME` 或 `process.env.USERPROFILE`(Windows)拼路径。
|
|
30
|
-
|
|
31
|
-
### Step 2: 逐项询问用户
|
|
32
|
-
|
|
33
|
-
依次询问以下字段,每项展示当前值(若有),并明确说明可以"直接回车保留当前值":
|
|
34
|
-
|
|
35
|
-
| 字段 | 必需 | 说明 |
|
|
36
|
-
|---|---|---|
|
|
37
|
-
| `baseURL` | ✅ | OpenAI 兼容 API 的 base URL,如 `https://api.minimax.chat/v1` |
|
|
38
|
-
| `apiKey` | ✅ | API key(敏感信息) |
|
|
39
|
-
| `model` | ✅ | 模型 id,如 `MiniMax-M2.7` |
|
|
40
|
-
| `provider` | ⬜ | 显示名(仅用于状态栏),默认 `env` |
|
|
41
|
-
| `contextWindow` | ⬜ | 模型上下文窗口(token 数),**推荐值见下方速查表**(按 provider+model 推断) |
|
|
42
|
-
| `tavilyApiKey` | ⬜ | Tavily key(WebSearch 工具用);可留空跳过,免费 key 申请见 https://tavily.com/ |
|
|
43
|
-
|
|
44
|
-
### Provider 默认值速查表(contextWindow)
|
|
45
|
-
|
|
46
|
-
权威值见 `src/cli/configWizard.tsx::PRESETS`;本表是它的镜像,发现不一致以代码为准。
|
|
47
|
-
|
|
48
|
-
| Provider | Model | 推荐 contextWindow |
|
|
49
|
-
|---|---|---|
|
|
50
|
-
| minimax | MiniMax-M2.7 / MiniMax-M1 / abab6.5s-chat | 204800 |
|
|
51
|
-
| deepseek | deepseek-chat / deepseek-reasoner | 128000 |
|
|
52
|
-
| openai | gpt-4o / gpt-4o-mini | 128000 |
|
|
53
|
-
| moonshot | moonshot-v1-8k | 8000 |
|
|
54
|
-
| moonshot | moonshot-v1-32k | 32000 |
|
|
55
|
-
| moonshot | moonshot-v1-128k | 128000 |
|
|
56
|
-
| volces | doubao-seed-2.0-pro / glm-5.1 / kimi-k2.6 / deepseek-v3.2 / minimax-latest | 204800 |
|
|
57
|
-
| 其它 / custom | — | 128000 |
|
|
58
|
-
|
|
59
|
-
⚠️ 火山方舟 ARK Coding Plan:一个 endpoint (`https://ark.cn-beijing.volces.com/api/coding/v3`) 后挂多个 model,**model 字段大小写严格匹配**(`glm-5.1` 而非 `GLM-5.1`)。常见 model id 见 `src/cli/configWizard.tsx::PRESETS` 的 `volces` 项;部分 model(如 `glm-5.1`)走 draft-2020-12 严校验,由 `src/utils/zodToJson.ts::modernizeExclusiveBounds` 透明兼容。
|
|
60
|
-
|
|
61
|
-
⚠️ 询问 `contextWindow` 时,**先按上表给出推荐值并明确告诉用户**(例:「按你选的 `MiniMax-M2.7`,推荐 `contextWindow = 204800`,直接回车采纳」)。**不要让用户裸填 token 数**;用户主要关心 `baseURL` / `apiKey` / `model`,contextWindow 应优先按 provider+model 推断。
|
|
62
|
-
|
|
63
|
-
如果用户改了 model 但没改 contextWindow,**主动重新计算推荐值**并提示;用户旧 contextWindow 与新 model 不匹配时(如把 model 从 `moonshot-v1-8k` 改成 `moonshot-v1-128k`),明确建议同步更新。
|
|
64
|
-
|
|
65
|
-
**对话格式示例**(每次只问一个字段,等用户答完再问下一个):
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
当前 baseURL: https://api.minimax.chat/v1
|
|
69
|
-
请输入新的 baseURL(直接回车保留当前值):
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
如果用户回车直接发空消息,保留旧值。
|
|
73
|
-
|
|
74
|
-
### Step 3: 写入配置
|
|
75
|
-
|
|
76
|
-
收齐所有字段后,构造完整 JSON 对象并用 Write 工具写入:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
Write({
|
|
80
|
-
file_path: "~/.minimal-agent/config.json",
|
|
81
|
-
content: JSON.stringify({
|
|
82
|
-
baseURL: <...>,
|
|
83
|
-
apiKey: <...>,
|
|
84
|
-
model: <...>,
|
|
85
|
-
provider: <...>,
|
|
86
|
-
contextWindow: <...>,
|
|
87
|
-
tavilyApiKey: <... or 省略字段>,
|
|
88
|
-
savedAt: Date.now()
|
|
89
|
-
}, null, 2)
|
|
90
|
-
})
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
字段 `savedAt` 必须是当前的 unix 毫秒时间戳。
|
|
94
|
-
|
|
95
|
-
`tavilyApiKey` 字段策略:
|
|
96
|
-
- 用户没有 Tavily key → **从写入的 JSON 里删掉这个字段**(不要写空串,readSavedConfig 会拒空串)。
|
|
97
|
-
- 用户提供了 key → 写入字符串。
|
|
98
|
-
- 用户没主动改这个字段 → **保留旧值**(不要为了"格式整洁"删除)。
|
|
99
|
-
- 写入后启动注入:下次启动 minimal-agent 时 `applyToolKeysToEnv()`(`src/config.ts`)会把它注入 `process.env.TAVILY_API_KEY`,WebSearch 工具就能用了。
|
|
100
|
-
|
|
101
|
-
### Step 4: 提示重启
|
|
102
|
-
|
|
103
|
-
写入成功后,输出(中文):
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
✅ 配置已更新到 ~/.minimal-agent/config.json
|
|
107
|
-
|
|
108
|
-
⚠️ 当前会话仍在使用旧配置。请按以下步骤让新配置生效:
|
|
109
|
-
1. 按 Ctrl+C 退出 minimal-agent
|
|
110
|
-
2. 重新运行(bun run start / minimal-agent / bun run src/main.tsx)
|
|
111
|
-
|
|
112
|
-
如果不想等重启,也可以临时 `export MINIMAL_AGENT_BASE_URL=... API_KEY=... MODEL=...`
|
|
113
|
-
再重新运行 —— 环境变量始终优先于配置文件。
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## 不做的事
|
|
119
|
-
|
|
120
|
-
- ❌ 不要主动调用 LLM API 测试新配置 —— 这可能用旧配置去打新地址,混乱
|
|
121
|
-
- ❌ 不要修改 `.env` 文件 —— 那是用户的私有文件,由用户自己管
|
|
122
|
-
- ❌ 不要在用户输入 `/config 帮我...` 等带其他内容的消息时触发本技能
|
|
123
|
-
- ❌ 不要试图"热重启"或重新加载 provider —— 重启进程是最可靠的方式
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|