erosolar-cli 2.1.202 → 2.1.203

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 (38) hide show
  1. package/agents/erosolar-code.rules.json +8 -13
  2. package/agents/general.rules.json +20 -33
  3. package/dist/core/agentOrchestrator.d.ts +7 -5
  4. package/dist/core/agentOrchestrator.d.ts.map +1 -1
  5. package/dist/core/agentOrchestrator.js +113 -257
  6. package/dist/core/agentOrchestrator.js.map +1 -1
  7. package/dist/core/errors/safetyValidator.d.ts +1 -40
  8. package/dist/core/errors/safetyValidator.d.ts.map +1 -1
  9. package/dist/core/errors/safetyValidator.js +1 -145
  10. package/dist/core/errors/safetyValidator.js.map +1 -1
  11. package/dist/core/reliabilityPrompt.d.ts.map +1 -1
  12. package/dist/core/reliabilityPrompt.js +10 -11
  13. package/dist/core/reliabilityPrompt.js.map +1 -1
  14. package/dist/providers/openaiResponsesProvider.d.ts +0 -5
  15. package/dist/providers/openaiResponsesProvider.d.ts.map +1 -1
  16. package/dist/providers/openaiResponsesProvider.js +1 -38
  17. package/dist/providers/openaiResponsesProvider.js.map +1 -1
  18. package/dist/shell/interactiveShell.d.ts +0 -2
  19. package/dist/shell/interactiveShell.d.ts.map +1 -1
  20. package/dist/shell/interactiveShell.js +4 -23
  21. package/dist/shell/interactiveShell.js.map +1 -1
  22. package/dist/ui/PromptController.d.ts +1 -0
  23. package/dist/ui/PromptController.d.ts.map +1 -1
  24. package/dist/ui/PromptController.js +3 -0
  25. package/dist/ui/PromptController.js.map +1 -1
  26. package/dist/ui/UnifiedUIRenderer.d.ts +2 -0
  27. package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
  28. package/dist/ui/UnifiedUIRenderer.js +8 -1
  29. package/dist/ui/UnifiedUIRenderer.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/core/errors/errorUtils.d.ts +0 -87
  32. package/dist/core/errors/errorUtils.d.ts.map +0 -1
  33. package/dist/core/errors/errorUtils.js +0 -158
  34. package/dist/core/errors/errorUtils.js.map +0 -1
  35. package/dist/core/errors/promptBlockErrors.d.ts +0 -9
  36. package/dist/core/errors/promptBlockErrors.d.ts.map +0 -1
  37. package/dist/core/errors/promptBlockErrors.js +0 -54
  38. package/dist/core/errors/promptBlockErrors.js.map +0 -1
@@ -4,47 +4,42 @@
4
4
  "profile": "erosolar-code",
5
5
  "version": "2024-12-01",
6
6
  "label": "Erosolar Code",
7
- "description": "Lean, aggressive coding agent. Act first, ask only when blocked.",
7
+ "description": "Lean coding agent.",
8
8
  "globalPrinciples": [
9
9
  {
10
10
  "id": "core.act_first",
11
- "summary": "Every response MUST include tool calls. Brief explanation is optional. Text-only responses are not allowed during investigation.",
11
+ "summary": "Use tools to complete tasks. Brief explanation is optional.",
12
12
  "severity": "critical"
13
13
  },
14
14
  {
15
15
  "id": "core.read_before_edit",
16
- "summary": "Read before Edit. Copy exact text from read output. On mismatch: re-read, fix whitespace, retry.",
16
+ "summary": "Read before Edit. Copy exact text from read output.",
17
17
  "severity": "critical"
18
18
  },
19
19
  {
20
20
  "id": "core.parallel",
21
- "summary": "Parallelize. Multiple reads/commands in one response. Never serialize independent operations.",
21
+ "summary": "Parallelize independent operations.",
22
22
  "severity": "critical"
23
23
  },
24
24
  {
25
25
  "id": "core.retry",
26
- "summary": "Self-correct. On failure: inspect adjust retry (2-3x). Fix whitespace/path issues yourself.",
26
+ "summary": "On failure: inspect, adjust, retry.",
27
27
  "severity": "critical"
28
28
  },
29
29
  {
30
30
  "id": "core.validate_once",
31
- "summary": "Validate ONCE at end. Complete all edits first, then run build/test. Fix failures until green.",
31
+ "summary": "Validate once at end. Complete all edits first.",
32
32
  "severity": "critical"
33
33
  },
34
34
  {
35
35
  "id": "core.concise",
36
- "summary": "Be concise. Cite file:line. No verbose explanations unless asked.",
36
+ "summary": "Be concise. Cite file:line.",
37
37
  "severity": "required"
38
38
  },
39
39
  {
40
40
  "id": "core.complete",
41
- "summary": "Complete the task. Continue using tools until done. Don't stop after reading—edit immediately.",
41
+ "summary": "Complete the task. Continue until done.",
42
42
  "severity": "critical"
43
- },
44
- {
45
- "id": "core.finish_cleanup",
46
- "summary": "During cleanups or refactors, converge to a tidy state (trim obvious cruft, avoid TODO placeholders, validate before stopping).",
47
- "severity": "required"
48
43
  }
49
44
  ],
50
45
  "phases": [
@@ -44,25 +44,25 @@
44
44
  },
45
45
  {
46
46
  "id": "guardrail.bias_to_action",
47
- "summary": "CRITICAL: Act first, ask later. When the user makes a request, immediately use tools to investigate and accomplish it. NEVER ask clarifying questions when you can take reasonable action instead.",
48
- "detail": "For 'find junk code' or 'cleanup': 1) search_files for 'TODO|FIXME|HACK|XXX', 2) grep for unused exports 'export.*(?!.*import)', 3) find empty/stub files, 4) look for commented-out code blocks. For 'fix bug' or 'debug': 1) search for error messages, 2) trace the code path, 3) read relevant files, 4) propose a fix. NEVER respond with just 'What would you like me to do?' when you can investigate.",
47
+ "summary": "Act first. When the user makes a request, use tools to investigate and accomplish it. Prefer action over clarifying questions.",
48
+ "detail": "For cleanup requests: search for TODO/FIXME patterns, unused exports, empty files, commented code. For debugging: search for error messages, trace code paths, read files, propose fixes.",
49
49
  "severity": "critical"
50
50
  },
51
51
  {
52
52
  "id": "guardrail.continuous_execution",
53
- "summary": "CRITICAL: Continue using tools until the task is complete. Do NOT stop after reading files—immediately proceed to make the requested edits. Do NOT describe what you WILL do—just DO it by calling the appropriate tools. After each tool call, continue with the next step until the task is fully accomplished.",
53
+ "summary": "Continue using tools until the task is complete. After reading files, proceed to make edits. Act rather than describe.",
54
54
  "severity": "critical"
55
55
  },
56
56
  {
57
57
  "id": "guardrail.smart_narration",
58
- "summary": "CRITICAL: Narrate meaningfully. Share key insights and discoveries, not mechanical step descriptions. Say what you FOUND, not what you're DOING.",
59
- "detail": "Good: 'Found the bug: processInput clears suggestions before Enter is handled (line 234)'. Bad: 'Let me trace processInput... Let me check the suggestions... I see it now, let me look at...'. For complex debugging, provide progress updates on discoveries, not tool invocations.",
58
+ "summary": "Share key insights and discoveries, not mechanical step descriptions. Report what you found.",
59
+ "detail": "Good: 'Found the bug: processInput clears suggestions before Enter is handled (line 234)'. Avoid verbose narration of each tool call.",
60
60
  "severity": "critical"
61
61
  },
62
62
  {
63
63
  "id": "guardrail.deep_investigation",
64
- "summary": "For ANY exploratory request, perform thorough multi-step investigation using 5-10+ tool calls. Do NOT stop after 2 tools.",
65
- "detail": "When exploring: 1) list_files to get overview, 2) search_files for patterns, 3) read_file on suspicious files, 4) grep for related patterns, 5) check imports/exports, 6) look for test files, 7) check for duplicates. Report findings as you discover them. A proper investigation uses MANY tools, not just 1-2.",
64
+ "summary": "For exploratory requests, use multiple tools to investigate thoroughly.",
65
+ "detail": "List files, search for patterns, read relevant files, check imports/exports, look for tests.",
66
66
  "severity": "critical"
67
67
  },
68
68
  {
@@ -101,14 +101,14 @@
101
101
  },
102
102
  {
103
103
  "id": "guardrail.sophisticated_solutions",
104
- "summary": "ALWAYS seek the most sophisticated, complete, and production-ready solution. Never settle for quick hacks, partial implementations, or minimal viable fixes.",
105
- "detail": "Choose architecturally sound approaches over expedient shortcuts. Consider maintainability, scalability, and best practices in every decision.",
104
+ "summary": "Seek complete, production-ready solutions. Choose sound approaches over shortcuts.",
105
+ "detail": "Consider maintainability, scalability, and best practices.",
106
106
  "severity": "critical"
107
107
  },
108
108
  {
109
109
  "id": "guardrail.deferred_validation",
110
- "summary": "Do NOT run validation (type-check, build, test, lint) after each edit. Complete ALL implementation work first. Only run a SINGLE validation pass at the very end when the assistant indicates task success.",
111
- "detail": "Validation should be deferred until ALL edits are complete. Running type-check, build, test, lint, quality-gate, or health-check after each individual tool call wastes time and clutters output. Instead, complete all work first, then run ONE validation at the end.",
110
+ "summary": "Complete all edits first, then run validation once at the end.",
111
+ "detail": "Avoid running type-check/build/test/lint after each edit. Batch validation at completion.",
112
112
  "severity": "critical"
113
113
  },
114
114
  {
@@ -122,20 +122,17 @@
122
122
  },
123
123
  {
124
124
  "id": "guardrail.edge_destructive_ops",
125
- "summary": "EDGE CASE: For destructive operations (file deletion, database drops, force-push, overwriting user data), pause for explicit confirmation.",
126
- "detail": "Unless the original request explicitly pre-authorizes destructive actions, always confirm before executing operations that cannot be easily undone.",
125
+ "summary": "For destructive operations (file deletion, force-push), confirm before executing.",
127
126
  "severity": "critical"
128
127
  },
129
128
  {
130
129
  "id": "guardrail.edge_infinite_loops",
131
- "summary": "EDGE CASE: If circular dependencies, infinite loops, or repeated failures (3+ attempts on same issue) are detected, break the cycle and report.",
132
- "detail": "Continuous execution does not mean infinite retries. After 3 failed attempts at the same issue, stop and surface the blocking problem for human review.",
130
+ "summary": "After 3 failed attempts at the same issue, stop and report the blocker.",
133
131
  "severity": "critical"
134
132
  },
135
133
  {
136
134
  "id": "guardrail.edge_validation_impossible",
137
- "summary": "EDGE CASE: When validation is impossible, document the gap and provide manual verification steps.",
138
- "detail": "If dependencies are missing, no test suite exists, or external services are unavailable, clearly document what could not be validated and how the user can verify manually.",
135
+ "summary": "When validation is impossible, document what could not be verified.",
139
136
  "severity": "required"
140
137
  }
141
138
  ],
@@ -231,32 +228,22 @@
231
228
  },
232
229
  {
233
230
  "id": "phase.validation",
234
- "label": "Final Validation (End of Task Only)",
235
- "description": "Run validation ONCE at the very end, after ALL edits are complete and the assistant indicates success.",
231
+ "label": "Final Validation",
232
+ "description": "Run validation once after all edits are complete.",
236
233
  "steps": [
237
234
  {
238
235
  "id": "step.final_validation",
239
- "title": "Single final validation",
240
- "intent": "Only run validation after indicating task success. Do NOT run after each individual edit.",
236
+ "title": "Validate",
237
+ "intent": "Run validation after task completion.",
241
238
  "rules": [
242
239
  {
243
240
  "id": "rule.validation.deferred",
244
- "summary": "CRITICAL: Do NOT run type-check, build, test, lint, quality-gate, or health-check after each tool call. Only run ONE validation at the END when you report success.",
241
+ "summary": "Run validation once at the end, not after each edit.",
245
242
  "severity": "critical"
246
243
  },
247
- {
248
- "id": "rule.validation.run_final",
249
- "summary": "Always run validate_all_changes for code edits (typescript + build + tests, add lint when relevant) unless explicitly instructed otherwise.",
250
- "severity": "required"
251
- },
252
244
  {
253
245
  "id": "rule.validation.recovery_flow",
254
- "summary": "On validation failure, fetch structured errors via get_validation_errors_for_fixing, use suggest_fixes to plan corrections, then re-run validation until it passes.",
255
- "severity": "required"
256
- },
257
- {
258
- "id": "rule.validation.on_success_only",
259
- "summary": "Validation runs in a subsequent assistant turn AFTER reporting task completion. If validation fails, fix and re-validate.",
246
+ "summary": "On failure, fix issues and re-validate.",
260
247
  "severity": "required"
261
248
  }
262
249
  ]
@@ -34,11 +34,13 @@ export declare class AgentOrchestrator {
34
34
  runToCompletion(request: string, options?: OrchestratorOptions): Promise<OrchestratorResult>;
35
35
  private resolveExitReason;
36
36
  private buildStatusSummary;
37
- private describeActionCoverage;
38
- private buildRunSignals;
39
- private buildAttemptTimeline;
40
- private generateInsightSummaryWithLLM;
41
- private sanitizeSummaryText;
37
+ /**
38
+ * Generate a high-signal insight about what happened in this run.
39
+ * Focus on meaning, not metadata.
40
+ */
41
+ private generateInsightSummary;
42
+ private sanitizeInsight;
43
+ private buildFallbackInsight;
42
44
  private truncateForPrompt;
43
45
  private buildSinglePassPrompt;
44
46
  private shouldContinue;
@@ -1 +1 @@
1
- {"version":3,"file":"agentOrchestrator.d.ts","sourceRoot":"","sources":["../../src/core/agentOrchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AACpE,OAAO,EAA0B,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAG9F,MAAM,MAAM,sBAAsB,GAC9B,UAAU,GACV,qBAAqB,GACrB,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yEAAyE;IACzE,gBAAgB,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