micro-models-agent 0.21.0 → 0.21.1

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.
Files changed (2) hide show
  1. package/dist/main.js +8 -30
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -2304,7 +2304,6 @@ Command: {command}`,
2304
2304
  "tool.friendly.process_log": "Process output",
2305
2305
  "tool.friendly.process_kill": "Stopping process",
2306
2306
  "plan.no_steps": "No plan steps specified. Provide concrete steps with files and commands.",
2307
- "plan.bad_steps": "Plan step quality unacceptable. Each step must describe concrete deliverables (files, packages, commands). Minimum 20 chars per step. Errors: {errors}",
2308
2307
  "plan.created": "Plan created: {title} ({steps} steps)",
2309
2308
  "plan.step_done": "Step {n}/{total}: {description} ✓",
2310
2309
  "plan.complete": "Task complete: {summary}",
@@ -2803,7 +2802,6 @@ var init_ru = __esm(() => {
2803
2802
  "tool.friendly.process_log": "Вывод процесса",
2804
2803
  "tool.friendly.process_kill": "Остановка процесса",
2805
2804
  "plan.no_steps": "Не указаны шаги плана. Укажите конкретные шаги с файлами и командами.",
2806
- "plan.bad_steps": "Качество шагов плана неприемлемо. Каждый шаг должен описывать конкретные deliverables (файлы, пакеты, команды). Минимум 20 символов на шаг. Ошибки: {errors}",
2807
2805
  "plan.created": "План создан: {title} ({steps} шагов)",
2808
2806
  "plan.step_done": "Шаг {n}/{total}: {description} ✓",
2809
2807
  "plan.complete": "Задача выполнена: {summary}",
@@ -12428,16 +12426,6 @@ class PlanCreator {
12428
12426
  baseDir
12429
12427
  };
12430
12428
  }
12431
- static validateSteps(steps) {
12432
- const errors = [];
12433
- for (let i = 0;i < steps.length; i++) {
12434
- const s = steps[i].trim();
12435
- if (s.length < MIN_STEP_DESC_LENGTH) {
12436
- errors.push(`Step ${i + 1} too short (${s.length} chars). Describe WHAT files to create, WHICH packages to install, WHICH commands to run. Minimum ${MIN_STEP_DESC_LENGTH} chars.`);
12437
- }
12438
- }
12439
- return { valid: errors.length === 0, errors };
12440
- }
12441
12429
  static toPromptBlock(plan, currentStepIndex) {
12442
12430
  const date = plan.createdAt.slice(0, 10);
12443
12431
  const lines = [
@@ -12455,7 +12443,6 @@ class PlanCreator {
12455
12443
  `);
12456
12444
  }
12457
12445
  }
12458
- var MIN_STEP_DESC_LENGTH = 20;
12459
12446
 
12460
12447
  // src/modules/execution/tracker.ts
12461
12448
  class PlanTracker {
@@ -12863,13 +12850,13 @@ class ExecutionModule {
12863
12850
  name: "plan",
12864
12851
  description: `Create, update, show, or abort a multi-step plan. Use "create" at the start of complex tasks. Use "update" after completing each step to track progress. Use "show" to re-print the current plan checklist.
12865
12852
 
12866
- IMPORTANT — each step MUST be detailed and concrete:
12867
- - Specify WHICH files to create (filenames with paths, e.g. "create src/components/Header.tsx...")
12868
- - Specify WHICH packages to install (e.g. "run npm install react react-dom")
12869
- - Specify WHICH commands to run with exact arguments
12870
- - Minimum 20 characters per step description
12871
- - BAD: "Настройка проекта"
12872
- - GOOD: "Создать package.json с зависимостями react@18, vite@5, установить их через npm install"`,
12853
+ IMPORTANT — each step MUST be detailed and concrete (≥50 chars):
12854
+ - Specify WHICH files to create with exact paths (e.g. "create src/components/Header.tsx with navigation and logo")
12855
+ - Specify WHICH packages to install with exact versions (e.g. "run npm install react@18.3 react-dom@18.3")
12856
+ - Specify WHICH CLI commands to run with exact arguments
12857
+ - Must contain at least one file extension (.ts, .tsx, .json, etc.) OR a command verb (install, create, build, run, add, init)
12858
+ - BAD: "Настройка проекта и установка зависимостей" (too vague, no files, no versions)
12859
+ - GOOD: "Создать package.json с зависимостями react@18.3 и vite@5.4, затем выполнить npm install в корне проекта"`,
12873
12860
  parameters: {
12874
12861
  type: "object",
12875
12862
  properties: {
@@ -12893,15 +12880,6 @@ IMPORTANT — each step MUST be detailed and concrete:
12893
12880
  if (steps.length === 0) {
12894
12881
  return { success: false, output: t("plan.no_steps") };
12895
12882
  }
12896
- const validation = PlanCreator.validateSteps(steps);
12897
- if (!validation.valid) {
12898
- return {
12899
- success: false,
12900
- output: t("plan.bad_steps", {
12901
- errors: validation.errors.join("; ")
12902
- })
12903
- };
12904
- }
12905
12883
  const plan = PlanCreator.createPlan(title, steps, this.baseDir);
12906
12884
  this.setPlan(plan);
12907
12885
  const display = PlanCreator.toPromptBlock(plan, 0);
@@ -14647,7 +14625,7 @@ function buildSystemInfo(config, baseDir, profileCompressed) {
14647
14625
  lines.push(``, `Windows environment — use Windows-compatible commands:`, `- Use "dir" instead of "ls". Use "dir /b" for bare listing.`, `- Use "type" or "Get-Content" instead of "cat".`, `- Use "cd" instead of "pwd". Use "echo %cd%" to print working directory.`, `- Use "copy" instead of "cp", "move" instead of "mv", "del" instead of "rm".`, `- Do not use "mkdir -p" — Windows mkdir creates intermediate dirs by default. Use the create_dir tool instead.`, `- Use forward slashes (/) or escaped backslashes (\\\\) in file paths.`, `- Your working directory is: ${baseDir}`);
14648
14626
  }
14649
14627
  lines.push(``, `Bash tool rules:`, `- Use the "workdir" parameter to run commands in a specific directory. Do NOT chain "cd dir && cmd" — the security module blocks the "&&" operator.`, `- Run one command per tool call. Split multi-step shell operations into separate bash calls.`, `- Background processes (dev servers, watchers, long-running npm install): use the "background: true" parameter or the tool will auto-detect and background them. Check output with process_log.`);
14650
- lines.push(``, `=== DEVELOPMENT RULES — follow these strictly ===`, ``, `1. DEPENDENCIES FIRST: Before writing any source code, ALWAYS install project dependencies (e.g., "npm install", "pip install -r requirements.txt", "cargo build", "go mod tidy"). Verify the package manager's lock file or dependency directory exists. Never write code that imports/uses packages that aren't installed yet.`, `2. TOOLKIT/FWK FIRST: If the task specifies a framework or UI library, initialize and configure it BEFORE writing application code. Run its project init command first, then add components/modules. Never write your own version of what the framework already provides.`, `3. ONE STEP AT A TIME: Follow the plan sequentially. Complete step N before starting step N+1. When a step is done: verify the deliverables exist and have real content (not empty), then call "plan update step=N status=done". Do not redo completed work.`, `4. VERIFY YOUR WORK: After creating/modifying files, verify they exist on disk. After installing dependencies, verify the package manager completed successfully. After any command, check its output for errors. Don't assume operations succeeded.`, `5. NO PREMATURE WORK: Do not create files for future steps. Do not add imports/references to packages or modules that haven't been installed yet. Do not reference files or components that don't exist yet. Build incrementally — one layer at a time.`, `6. WHEN STUCK: If a command fails 2+ times, STOP and try a different approach. Write files directly instead of using commands. Ask the user for help. Never repeat the same failing command more than twice.`, ``, `=== PLAN QUALITY RULES — your plan MUST follow these ===`, ``, `- Each step must describe CONCRETE deliverables: exact filenames with paths, exact packages to install, exact CLI commands to run.`, `- A step like "Настройка проекта" or "Setup the project" is USELESS and will be REJECTED.`, `- A step like "Создать src/components/Header.tsx с хедером навигации, подключить в App.tsx" is GOOD.`, `- Include file extensions (.tsx, .css, .json) and directory paths. Never write vague steps.`, `- The plan must cover EVERYTHING needed: init → deps → framework setup → code → verification.`, `- Number of steps: 5-8 for a typical task. Too few means you're being vague. Too many means you're over-splitting.`);
14628
+ lines.push(``, `=== DEVELOPMENT RULES — follow these strictly ===`, ``, `1. DEPENDENCIES FIRST: Before writing any source code, ALWAYS install project dependencies (e.g., "npm install", "pip install -r requirements.txt", "cargo build", "go mod tidy"). Verify the package manager's lock file or dependency directory exists. Never write code that imports/uses packages that aren't installed yet.`, `2. TOOLKIT/FWK FIRST: If the task specifies a framework or UI library, initialize and configure it BEFORE writing application code. Run its project init command first, then add components/modules. Never write your own version of what the framework already provides.`, `3. ONE STEP AT A TIME: Follow the plan sequentially. Complete step N before starting step N+1. When a step is done: verify the deliverables exist and have real content (not empty), then call "plan update step=N status=done". Do not redo completed work.`, `4. VERIFY YOUR WORK: After creating/modifying files, verify they exist on disk. After installing dependencies, verify the package manager completed successfully. After any command, check its output for errors. Don't assume operations succeeded.`, `5. NO PREMATURE WORK: Do not create files for future steps. Do not add imports/references to packages or modules that haven't been installed yet. Do not reference files or components that don't exist yet. Build incrementally — one layer at a time.`, `6. WHEN STUCK: If a command fails 2+ times, STOP and try a different approach. Write files directly instead of using commands. Ask the user for help. Never repeat the same failing command more than twice.`, ``, `=== PLAN QUALITY RULES — your plan MUST follow these ===`, ``, `- Each step must describe CONCRETE deliverables: exact filenames with paths, exact packages to install, exact CLI commands to run. Steps shorter than 50 characters or without file paths/commands are REJECTED.`, `- A step like "Настройка проекта" or "Setup the project" is USELESS and will be REJECTED.`, `- A step like "Создать src/components/Header.tsx с навигацией и логотипом, добавить в src/App.tsx импорт <Header />" is GOOD.`, `- Include file extensions (.tsx, .css, .json) and directory paths. Every step must mention at least one file or command.`, `- The plan must cover EVERYTHING needed: init → deps → framework setup → code → verification.`, `- Number of steps: 5-8 for a typical task. Too few means you're being vague. Too many means you're over-splitting.`);
14651
14629
  if (config.autoPlan) {
14652
14630
  lines.push(``, `Plan rule (MANDATORY): For ANY task that requires creating files, installing packages, or multiple actions — you MUST create a plan using the "plan" tool BEFORE starting work. Each step must describe a concrete deliverable (specific files to create, packages to install, commands to run). Do not combine unrelated work into one step.`);
14653
14631
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micro-models-agent",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Micro Models Agent (MMA) — LLM agent harness for small models (Qwen3.5-9B, 32K-64K context)",
5
5
  "type": "module",
6
6
  "bin": {