@workermill/agent 0.4.9 → 0.5.2
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/dist/plan-validator.d.ts +1 -1
- package/dist/plan-validator.js +3 -3
- package/dist/spawner.js +2 -1
- package/package.json +1 -1
package/dist/plan-validator.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface CriticResult {
|
|
|
39
39
|
suggestedChanges?: string[];
|
|
40
40
|
}>;
|
|
41
41
|
}
|
|
42
|
-
declare const AUTO_APPROVAL_THRESHOLD =
|
|
42
|
+
declare const AUTO_APPROVAL_THRESHOLD = 80;
|
|
43
43
|
/**
|
|
44
44
|
* Parse execution plan JSON from raw Claude CLI output.
|
|
45
45
|
* Mirrors server-side parseExecutionPlan() in planning-agent-local.ts.
|
package/dist/plan-validator.js
CHANGED
|
@@ -16,7 +16,7 @@ import { generateText } from "./providers.js";
|
|
|
16
16
|
// CONSTANTS
|
|
17
17
|
// ============================================================================
|
|
18
18
|
const MAX_TARGET_FILES = 5;
|
|
19
|
-
const AUTO_APPROVAL_THRESHOLD =
|
|
19
|
+
const AUTO_APPROVAL_THRESHOLD = 80;
|
|
20
20
|
// ============================================================================
|
|
21
21
|
// PLAN PARSING
|
|
22
22
|
// ============================================================================
|
|
@@ -100,7 +100,7 @@ Review this execution plan against the PRD:
|
|
|
100
100
|
1. **Missing Requirements** - Does the plan cover what the PRD asks for?
|
|
101
101
|
2. **Vague Instructions** - Will the worker know what to do?
|
|
102
102
|
3. **Security Issues** - Only for tasks involving auth, user data, or external input
|
|
103
|
-
4. **Unrealistic Scope** - Any step targeting >3 files MUST score below
|
|
103
|
+
4. **Unrealistic Scope** - Any step targeting >3 files MUST score below 80 (auto-rejection threshold). Each step should modify at most 3 files. If a step needs more, split it into multiple steps first.
|
|
104
104
|
5. **Missing Operational Steps** - If the PRD requires deployment, provisioning, migrations, or running commands, does the plan include operational steps? Writing code is not the same as deploying it.
|
|
105
105
|
6. **Overlapping File Scope** - If two or more steps share the same targetFiles, this causes parallel merge conflicts. Steps MUST NOT overlap on targetFiles. Deduct 10 points per shared file across steps.
|
|
106
106
|
|
|
@@ -117,7 +117,7 @@ Respond with ONLY a JSON object (no markdown, no explanation):
|
|
|
117
117
|
{"approved": boolean, "score": number, "risks": ["risk1", "risk2"], "suggestions": ["suggestion1", "suggestion2"], "storyFeedback": [{"storyId": "step-0", "feedback": "specific feedback", "suggestedChanges": ["change1"]}]}
|
|
118
118
|
|
|
119
119
|
Rules:
|
|
120
|
-
- approved = true if score >=
|
|
120
|
+
- approved = true if score >= 80 AND plan is right-sized for task
|
|
121
121
|
- risks = specific issues (empty array if none)
|
|
122
122
|
- suggestions = actionable improvements (empty array if none)
|
|
123
123
|
- storyFeedback = per-step feedback (optional, only for steps that need changes)`;
|
package/dist/spawner.js
CHANGED
|
@@ -197,7 +197,7 @@ export async function spawnWorker(task, config, orgConfig, credentials) {
|
|
|
197
197
|
// Task notes from dashboard
|
|
198
198
|
TASK_NOTES: task.taskNotes || "",
|
|
199
199
|
// AI provider configuration
|
|
200
|
-
ANTHROPIC_API_KEY: credentials?.anthropicApiKey || process.env.ANTHROPIC_API_KEY || "",
|
|
200
|
+
ANTHROPIC_API_KEY: claudeConfigDir ? "" : (credentials?.anthropicApiKey || process.env.ANTHROPIC_API_KEY || ""),
|
|
201
201
|
WORKER_PROVIDER: task.workerProvider || "anthropic",
|
|
202
202
|
OPENAI_API_KEY: credentials?.openaiApiKey || "",
|
|
203
203
|
GOOGLE_API_KEY: credentials?.googleApiKey || "",
|
|
@@ -208,6 +208,7 @@ export async function spawnWorker(task, config, orgConfig, credentials) {
|
|
|
208
208
|
BLOCKER_AUTO_RETRY_ENABLED: orgConfig.blockerAutoRetryEnabled !== false ? "true" : "false",
|
|
209
209
|
PUSH_AFTER_COMMIT: orgConfig.pushAfterCommit !== false ? "true" : "false",
|
|
210
210
|
GRACEFUL_SHUTDOWN_ENABLED: orgConfig.gracefulShutdownEnabled !== false ? "true" : "false",
|
|
211
|
+
MAX_PARALLEL_EXPERTS: String(orgConfig.maxParallelExperts ?? 4),
|
|
211
212
|
REVIEW_ENABLED: task.skipManagerReview === false ? "true" : "false",
|
|
212
213
|
SELF_REVIEW_ENABLED: hasSelfReviewLabel(task) || (orgConfig.selfReviewEnabled !== false) ? "true" : "false",
|
|
213
214
|
};
|