steroids-api 0.2.7
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/API/src/index.d.ts +10 -0
- package/dist/API/src/index.d.ts.map +1 -0
- package/dist/API/src/index.js +130 -0
- package/dist/API/src/index.js.map +1 -0
- package/dist/API/src/routes/activity.d.ts +7 -0
- package/dist/API/src/routes/activity.d.ts.map +1 -0
- package/dist/API/src/routes/activity.js +252 -0
- package/dist/API/src/routes/activity.js.map +1 -0
- package/dist/API/src/routes/config.d.ts +7 -0
- package/dist/API/src/routes/config.d.ts.map +1 -0
- package/dist/API/src/routes/config.js +521 -0
- package/dist/API/src/routes/config.js.map +1 -0
- package/dist/API/src/routes/health.d.ts +7 -0
- package/dist/API/src/routes/health.d.ts.map +1 -0
- package/dist/API/src/routes/health.js +172 -0
- package/dist/API/src/routes/health.js.map +1 -0
- package/dist/API/src/routes/incidents.d.ts +7 -0
- package/dist/API/src/routes/incidents.d.ts.map +1 -0
- package/dist/API/src/routes/incidents.js +117 -0
- package/dist/API/src/routes/incidents.js.map +1 -0
- package/dist/API/src/routes/projects.d.ts +7 -0
- package/dist/API/src/routes/projects.d.ts.map +1 -0
- package/dist/API/src/routes/projects.js +398 -0
- package/dist/API/src/routes/projects.js.map +1 -0
- package/dist/API/src/routes/runners.d.ts +7 -0
- package/dist/API/src/routes/runners.d.ts.map +1 -0
- package/dist/API/src/routes/runners.js +242 -0
- package/dist/API/src/routes/runners.js.map +1 -0
- package/dist/API/src/routes/tasks.d.ts +7 -0
- package/dist/API/src/routes/tasks.d.ts.map +1 -0
- package/dist/API/src/routes/tasks.js +1007 -0
- package/dist/API/src/routes/tasks.js.map +1 -0
- package/dist/API/src/utils/validation.d.ts +22 -0
- package/dist/API/src/utils/validation.d.ts.map +1 -0
- package/dist/API/src/utils/validation.js +50 -0
- package/dist/API/src/utils/validation.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +184 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/activity.d.ts +7 -0
- package/dist/routes/activity.d.ts.map +1 -0
- package/dist/routes/activity.js +252 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/config.d.ts +7 -0
- package/dist/routes/config.d.ts.map +1 -0
- package/dist/routes/config.js +647 -0
- package/dist/routes/config.js.map +1 -0
- package/dist/routes/credit-alerts.d.ts +2 -0
- package/dist/routes/credit-alerts.d.ts.map +1 -0
- package/dist/routes/credit-alerts.js +97 -0
- package/dist/routes/credit-alerts.js.map +1 -0
- package/dist/routes/health.d.ts +7 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +200 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/incidents.d.ts +7 -0
- package/dist/routes/incidents.d.ts.map +1 -0
- package/dist/routes/incidents.js +117 -0
- package/dist/routes/incidents.js.map +1 -0
- package/dist/routes/projects.d.ts +7 -0
- package/dist/routes/projects.d.ts.map +1 -0
- package/dist/routes/projects.js +643 -0
- package/dist/routes/projects.js.map +1 -0
- package/dist/routes/runners.d.ts +7 -0
- package/dist/routes/runners.d.ts.map +1 -0
- package/dist/routes/runners.js +299 -0
- package/dist/routes/runners.js.map +1 -0
- package/dist/routes/skills.d.ts +3 -0
- package/dist/routes/skills.d.ts.map +1 -0
- package/dist/routes/skills.js +109 -0
- package/dist/routes/skills.js.map +1 -0
- package/dist/routes/storage.d.ts +7 -0
- package/dist/routes/storage.d.ts.map +1 -0
- package/dist/routes/storage.js +93 -0
- package/dist/routes/storage.js.map +1 -0
- package/dist/routes/tasks.d.ts +7 -0
- package/dist/routes/tasks.d.ts.map +1 -0
- package/dist/routes/tasks.js +1145 -0
- package/dist/routes/tasks.js.map +1 -0
- package/dist/src/cleanup/invocation-logs.d.ts +30 -0
- package/dist/src/cleanup/invocation-logs.d.ts.map +1 -0
- package/dist/src/cleanup/invocation-logs.js +66 -0
- package/dist/src/cleanup/invocation-logs.js.map +1 -0
- package/dist/src/commands/loop-phases.d.ts +11 -0
- package/dist/src/commands/loop-phases.d.ts.map +1 -0
- package/dist/src/commands/loop-phases.js +304 -0
- package/dist/src/commands/loop-phases.js.map +1 -0
- package/dist/src/config/loader.d.ts +160 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +276 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/database/connection.d.ts +35 -0
- package/dist/src/database/connection.d.ts.map +1 -0
- package/dist/src/database/connection.js +197 -0
- package/dist/src/database/connection.js.map +1 -0
- package/dist/src/database/queries.d.ts +220 -0
- package/dist/src/database/queries.d.ts.map +1 -0
- package/dist/src/database/queries.js +589 -0
- package/dist/src/database/queries.js.map +1 -0
- package/dist/src/database/schema.d.ts +8 -0
- package/dist/src/database/schema.d.ts.map +1 -0
- package/dist/src/database/schema.js +184 -0
- package/dist/src/database/schema.js.map +1 -0
- package/dist/src/git/push.d.ts +26 -0
- package/dist/src/git/push.d.ts.map +1 -0
- package/dist/src/git/push.js +91 -0
- package/dist/src/git/push.js.map +1 -0
- package/dist/src/git/status.d.ts +83 -0
- package/dist/src/git/status.d.ts.map +1 -0
- package/dist/src/git/status.js +315 -0
- package/dist/src/git/status.js.map +1 -0
- package/dist/src/health/stuck-task-detector.d.ts +131 -0
- package/dist/src/health/stuck-task-detector.d.ts.map +1 -0
- package/dist/src/health/stuck-task-detector.js +233 -0
- package/dist/src/health/stuck-task-detector.js.map +1 -0
- package/dist/src/health/stuck-task-recovery.d.ts +45 -0
- package/dist/src/health/stuck-task-recovery.d.ts.map +1 -0
- package/dist/src/health/stuck-task-recovery.js +309 -0
- package/dist/src/health/stuck-task-recovery.js.map +1 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +130 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/locking/queries.d.ts +116 -0
- package/dist/src/locking/queries.d.ts.map +1 -0
- package/dist/src/locking/queries.js +232 -0
- package/dist/src/locking/queries.js.map +1 -0
- package/dist/src/locking/section-lock.d.ts +74 -0
- package/dist/src/locking/section-lock.d.ts.map +1 -0
- package/dist/src/locking/section-lock.js +196 -0
- package/dist/src/locking/section-lock.js.map +1 -0
- package/dist/src/locking/task-lock.d.ts +92 -0
- package/dist/src/locking/task-lock.d.ts.map +1 -0
- package/dist/src/locking/task-lock.js +233 -0
- package/dist/src/locking/task-lock.js.map +1 -0
- package/dist/src/migrations/index.d.ts +7 -0
- package/dist/src/migrations/index.d.ts.map +1 -0
- package/dist/src/migrations/index.js +9 -0
- package/dist/src/migrations/index.js.map +1 -0
- package/dist/src/migrations/manifest.d.ts +92 -0
- package/dist/src/migrations/manifest.d.ts.map +1 -0
- package/dist/src/migrations/manifest.js +255 -0
- package/dist/src/migrations/manifest.js.map +1 -0
- package/dist/src/migrations/runner.d.ts +84 -0
- package/dist/src/migrations/runner.d.ts.map +1 -0
- package/dist/src/migrations/runner.js +338 -0
- package/dist/src/migrations/runner.js.map +1 -0
- package/dist/src/orchestrator/coder.d.ts +32 -0
- package/dist/src/orchestrator/coder.d.ts.map +1 -0
- package/dist/src/orchestrator/coder.js +170 -0
- package/dist/src/orchestrator/coder.js.map +1 -0
- package/dist/src/orchestrator/coordinator.d.ts +28 -0
- package/dist/src/orchestrator/coordinator.d.ts.map +1 -0
- package/dist/src/orchestrator/coordinator.js +252 -0
- package/dist/src/orchestrator/coordinator.js.map +1 -0
- package/dist/src/orchestrator/fallback-handler.d.ts +24 -0
- package/dist/src/orchestrator/fallback-handler.d.ts.map +1 -0
- package/dist/src/orchestrator/fallback-handler.js +280 -0
- package/dist/src/orchestrator/fallback-handler.js.map +1 -0
- package/dist/src/orchestrator/invoke.d.ts +14 -0
- package/dist/src/orchestrator/invoke.d.ts.map +1 -0
- package/dist/src/orchestrator/invoke.js +76 -0
- package/dist/src/orchestrator/invoke.js.map +1 -0
- package/dist/src/orchestrator/post-coder.d.ts +10 -0
- package/dist/src/orchestrator/post-coder.d.ts.map +1 -0
- package/dist/src/orchestrator/post-coder.js +198 -0
- package/dist/src/orchestrator/post-coder.js.map +1 -0
- package/dist/src/orchestrator/post-reviewer.d.ts +10 -0
- package/dist/src/orchestrator/post-reviewer.d.ts.map +1 -0
- package/dist/src/orchestrator/post-reviewer.js +199 -0
- package/dist/src/orchestrator/post-reviewer.js.map +1 -0
- package/dist/src/orchestrator/reviewer.d.ts +35 -0
- package/dist/src/orchestrator/reviewer.d.ts.map +1 -0
- package/dist/src/orchestrator/reviewer.js +237 -0
- package/dist/src/orchestrator/reviewer.js.map +1 -0
- package/dist/src/orchestrator/schemas.d.ts +10 -0
- package/dist/src/orchestrator/schemas.d.ts.map +1 -0
- package/dist/src/orchestrator/schemas.js +81 -0
- package/dist/src/orchestrator/schemas.js.map +1 -0
- package/dist/src/orchestrator/task-selector.d.ts +102 -0
- package/dist/src/orchestrator/task-selector.d.ts.map +1 -0
- package/dist/src/orchestrator/task-selector.js +326 -0
- package/dist/src/orchestrator/task-selector.js.map +1 -0
- package/dist/src/orchestrator/types.d.ts +74 -0
- package/dist/src/orchestrator/types.d.ts.map +1 -0
- package/dist/src/orchestrator/types.js +5 -0
- package/dist/src/orchestrator/types.js.map +1 -0
- package/dist/src/prompts/coder.d.ts +36 -0
- package/dist/src/prompts/coder.d.ts.map +1 -0
- package/dist/src/prompts/coder.js +303 -0
- package/dist/src/prompts/coder.js.map +1 -0
- package/dist/src/prompts/prompt-helpers.d.ts +51 -0
- package/dist/src/prompts/prompt-helpers.d.ts.map +1 -0
- package/dist/src/prompts/prompt-helpers.js +299 -0
- package/dist/src/prompts/prompt-helpers.js.map +1 -0
- package/dist/src/prompts/reviewer.d.ts +40 -0
- package/dist/src/prompts/reviewer.d.ts.map +1 -0
- package/dist/src/prompts/reviewer.js +416 -0
- package/dist/src/prompts/reviewer.js.map +1 -0
- package/dist/src/providers/claude.d.ts +53 -0
- package/dist/src/providers/claude.d.ts.map +1 -0
- package/dist/src/providers/claude.js +227 -0
- package/dist/src/providers/claude.js.map +1 -0
- package/dist/src/providers/codex.d.ts +53 -0
- package/dist/src/providers/codex.d.ts.map +1 -0
- package/dist/src/providers/codex.js +253 -0
- package/dist/src/providers/codex.js.map +1 -0
- package/dist/src/providers/gemini.d.ts +58 -0
- package/dist/src/providers/gemini.d.ts.map +1 -0
- package/dist/src/providers/gemini.js +240 -0
- package/dist/src/providers/gemini.js.map +1 -0
- package/dist/src/providers/interface.d.ts +185 -0
- package/dist/src/providers/interface.d.ts.map +1 -0
- package/dist/src/providers/interface.js +92 -0
- package/dist/src/providers/interface.js.map +1 -0
- package/dist/src/providers/invocation-logger.d.ts +97 -0
- package/dist/src/providers/invocation-logger.d.ts.map +1 -0
- package/dist/src/providers/invocation-logger.js +378 -0
- package/dist/src/providers/invocation-logger.js.map +1 -0
- package/dist/src/providers/openai.d.ts +53 -0
- package/dist/src/providers/openai.d.ts.map +1 -0
- package/dist/src/providers/openai.js +230 -0
- package/dist/src/providers/openai.js.map +1 -0
- package/dist/src/providers/registry.d.ts +100 -0
- package/dist/src/providers/registry.d.ts.map +1 -0
- package/dist/src/providers/registry.js +170 -0
- package/dist/src/providers/registry.js.map +1 -0
- package/dist/src/routes/activity.d.ts +7 -0
- package/dist/src/routes/activity.d.ts.map +1 -0
- package/dist/src/routes/activity.js +252 -0
- package/dist/src/routes/activity.js.map +1 -0
- package/dist/src/routes/config.d.ts +7 -0
- package/dist/src/routes/config.d.ts.map +1 -0
- package/dist/src/routes/config.js +521 -0
- package/dist/src/routes/config.js.map +1 -0
- package/dist/src/routes/health.d.ts +7 -0
- package/dist/src/routes/health.d.ts.map +1 -0
- package/dist/src/routes/health.js +172 -0
- package/dist/src/routes/health.js.map +1 -0
- package/dist/src/routes/incidents.d.ts +7 -0
- package/dist/src/routes/incidents.d.ts.map +1 -0
- package/dist/src/routes/incidents.js +117 -0
- package/dist/src/routes/incidents.js.map +1 -0
- package/dist/src/routes/projects.d.ts +7 -0
- package/dist/src/routes/projects.d.ts.map +1 -0
- package/dist/src/routes/projects.js +398 -0
- package/dist/src/routes/projects.js.map +1 -0
- package/dist/src/routes/runners.d.ts +7 -0
- package/dist/src/routes/runners.d.ts.map +1 -0
- package/dist/src/routes/runners.js +242 -0
- package/dist/src/routes/runners.js.map +1 -0
- package/dist/src/routes/tasks.d.ts +7 -0
- package/dist/src/routes/tasks.d.ts.map +1 -0
- package/dist/src/routes/tasks.js +1007 -0
- package/dist/src/routes/tasks.js.map +1 -0
- package/dist/src/runners/activity-log.d.ts +65 -0
- package/dist/src/runners/activity-log.d.ts.map +1 -0
- package/dist/src/runners/activity-log.js +140 -0
- package/dist/src/runners/activity-log.js.map +1 -0
- package/dist/src/runners/cron.d.ts +30 -0
- package/dist/src/runners/cron.d.ts.map +1 -0
- package/dist/src/runners/cron.js +333 -0
- package/dist/src/runners/cron.js.map +1 -0
- package/dist/src/runners/daemon.d.ts +71 -0
- package/dist/src/runners/daemon.d.ts.map +1 -0
- package/dist/src/runners/daemon.js +233 -0
- package/dist/src/runners/daemon.js.map +1 -0
- package/dist/src/runners/global-db.d.ts +31 -0
- package/dist/src/runners/global-db.d.ts.map +1 -0
- package/dist/src/runners/global-db.js +220 -0
- package/dist/src/runners/global-db.js.map +1 -0
- package/dist/src/runners/hang-detector.d.ts +38 -0
- package/dist/src/runners/hang-detector.d.ts.map +1 -0
- package/dist/src/runners/hang-detector.js +130 -0
- package/dist/src/runners/hang-detector.js.map +1 -0
- package/dist/src/runners/heartbeat.d.ts +39 -0
- package/dist/src/runners/heartbeat.d.ts.map +1 -0
- package/dist/src/runners/heartbeat.js +71 -0
- package/dist/src/runners/heartbeat.js.map +1 -0
- package/dist/src/runners/lock.d.ts +47 -0
- package/dist/src/runners/lock.d.ts.map +1 -0
- package/dist/src/runners/lock.js +140 -0
- package/dist/src/runners/lock.js.map +1 -0
- package/dist/src/runners/orchestrator-loop.d.ts +20 -0
- package/dist/src/runners/orchestrator-loop.d.ts.map +1 -0
- package/dist/src/runners/orchestrator-loop.js +208 -0
- package/dist/src/runners/orchestrator-loop.js.map +1 -0
- package/dist/src/runners/projects.d.ts +96 -0
- package/dist/src/runners/projects.d.ts.map +1 -0
- package/dist/src/runners/projects.js +243 -0
- package/dist/src/runners/projects.js.map +1 -0
- package/dist/src/runners/wakeup.d.ts +37 -0
- package/dist/src/runners/wakeup.d.ts.map +1 -0
- package/dist/src/runners/wakeup.js +355 -0
- package/dist/src/runners/wakeup.js.map +1 -0
- package/dist/src/utils/validation.d.ts +22 -0
- package/dist/src/utils/validation.d.ts.map +1 -0
- package/dist/src/utils/validation.js +50 -0
- package/dist/src/utils/validation.js.map +1 -0
- package/dist/utils/sqlite.d.ts +17 -0
- package/dist/utils/sqlite.d.ts.map +1 -0
- package/dist/utils/sqlite.js +27 -0
- package/dist/utils/sqlite.js.map +1 -0
- package/dist/utils/storage-cache.d.ts +33 -0
- package/dist/utils/storage-cache.d.ts.map +1 -0
- package/dist/utils/storage-cache.js +81 -0
- package/dist/utils/storage-cache.js.map +1 -0
- package/dist/utils/validation.d.ts +22 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +51 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +39 -0
- package/src/index.ts +199 -0
- package/src/routes/activity.ts +302 -0
- package/src/routes/config.ts +723 -0
- package/src/routes/credit-alerts.ts +73 -0
- package/src/routes/health.ts +219 -0
- package/src/routes/incidents.ts +131 -0
- package/src/routes/projects.ts +854 -0
- package/src/routes/runners.ts +357 -0
- package/src/routes/skills.ts +127 -0
- package/src/routes/storage.ts +108 -0
- package/src/routes/tasks.ts +1372 -0
- package/src/utils/sqlite.ts +36 -0
- package/src/utils/storage-cache.ts +107 -0
- package/src/utils/validation.ts +61 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reviewer prompt templates
|
|
3
|
+
* Following the exact templates from PROMPTS.md
|
|
4
|
+
*/
|
|
5
|
+
import type { Task, RejectionEntry } from '../database/queries.js';
|
|
6
|
+
import type { SteroidsConfig } from '../config/loader.js';
|
|
7
|
+
import type { SectionTask } from './prompt-helpers.js';
|
|
8
|
+
export interface ReviewerPromptContext {
|
|
9
|
+
task: Task;
|
|
10
|
+
projectPath: string;
|
|
11
|
+
reviewerModel: string;
|
|
12
|
+
gitDiff: string;
|
|
13
|
+
modifiedFiles: string[];
|
|
14
|
+
sectionTasks?: SectionTask[];
|
|
15
|
+
rejectionHistory?: RejectionEntry[];
|
|
16
|
+
submissionNotes?: string | null;
|
|
17
|
+
config: SteroidsConfig;
|
|
18
|
+
coordinatorGuidance?: string;
|
|
19
|
+
coordinatorDecision?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generate the reviewer prompt
|
|
23
|
+
*/
|
|
24
|
+
export declare function generateReviewerPrompt(context: ReviewerPromptContext): string;
|
|
25
|
+
/**
|
|
26
|
+
* Context for batch reviewer prompts
|
|
27
|
+
*/
|
|
28
|
+
export interface BatchReviewerPromptContext {
|
|
29
|
+
tasks: Task[];
|
|
30
|
+
projectPath: string;
|
|
31
|
+
sectionName: string;
|
|
32
|
+
gitDiff: string;
|
|
33
|
+
modifiedFiles: string[];
|
|
34
|
+
config: SteroidsConfig;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generate the reviewer prompt for a batch of tasks
|
|
38
|
+
*/
|
|
39
|
+
export declare function generateBatchReviewerPrompt(context: BatchReviewerPromptContext): string;
|
|
40
|
+
//# sourceMappingURL=reviewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../../../src/prompts/reviewer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAgID;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CA4L7E;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,CA8GvF"}
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reviewer prompt templates
|
|
3
|
+
* Following the exact templates from PROMPTS.md
|
|
4
|
+
*/
|
|
5
|
+
import { getSourceFileContent, buildFileAnchorSection, formatSectionTasks } from './prompt-helpers.js';
|
|
6
|
+
/**
|
|
7
|
+
* Format rejection history for display
|
|
8
|
+
*/
|
|
9
|
+
function formatRejectionHistory(rejections) {
|
|
10
|
+
if (!rejections || rejections.length === 0) {
|
|
11
|
+
return `
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Rejection History
|
|
15
|
+
|
|
16
|
+
No previous rejections. This is the first review.
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
const lines = rejections.map(r => {
|
|
20
|
+
const commitRef = r.commit_sha ? ` (commit: ${r.commit_sha.substring(0, 7)})` : '';
|
|
21
|
+
const notes = r.notes || '(no notes provided)';
|
|
22
|
+
return `### Rejection #${r.rejection_number}${commitRef}
|
|
23
|
+
${notes}
|
|
24
|
+
`;
|
|
25
|
+
});
|
|
26
|
+
// Always provide specific guidance - don't wait for high rejection count
|
|
27
|
+
const guidanceNote = `
|
|
28
|
+
**Rejection Best Practices:**
|
|
29
|
+
- Provide specific file:line references (e.g., \`src/foo.ts:42\`)
|
|
30
|
+
- Include exact code snippets that need to change
|
|
31
|
+
- Point to similar working patterns in the codebase
|
|
32
|
+
- Explain WHY the current approach doesn't work, not just WHAT is wrong
|
|
33
|
+
- **NEVER demand global/overall project coverage** - only coverage for THIS task's modified files
|
|
34
|
+
- **Follow the project's architecture** - if coder's approach matches existing patterns, accept it`;
|
|
35
|
+
const highRejectionWarning = rejections.length >= 3 ? `
|
|
36
|
+
|
|
37
|
+
**CRITICAL: This task has been rejected ${rejections.length} times.**
|
|
38
|
+
- If you are about to reject for the SAME reasons as before, consider whether the requirement is achievable
|
|
39
|
+
- If the coder has attempted to address your feedback but can't fully resolve it, consider APPROVING with notes
|
|
40
|
+
- If there's a fundamental disagreement, use DISPUTE instead of rejecting again
|
|
41
|
+
- Ask yourself: "Is what I'm asking for within the scope of THIS single task?"
|
|
42
|
+
` : '';
|
|
43
|
+
return `
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Rejection History (${rejections.length} previous)
|
|
47
|
+
${highRejectionWarning}
|
|
48
|
+
**Review this history carefully before making your decision.**
|
|
49
|
+
- Look for patterns: Is the same issue being raised repeatedly?
|
|
50
|
+
- If an issue was raised before and not fixed, be MORE SPECIFIC about what exactly needs to change
|
|
51
|
+
- Use commit hashes to examine previous attempts: \`git show <hash>\`
|
|
52
|
+
- The coder only sees YOUR rejection notes - make them actionable
|
|
53
|
+
${guidanceNote}
|
|
54
|
+
${lines.join('\n')}
|
|
55
|
+
`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Format section tasks for display
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* Format coordinator guidance for the reviewer
|
|
62
|
+
* Makes coordinator decisions visible and enforceable by the reviewer
|
|
63
|
+
*/
|
|
64
|
+
function formatCoordinatorGuidance(guidance, decision) {
|
|
65
|
+
if (!guidance)
|
|
66
|
+
return '';
|
|
67
|
+
const decisionLabels = {
|
|
68
|
+
'guide_coder': 'Guide coder (reviewer feedback is valid, coder needs clearer direction)',
|
|
69
|
+
'override_reviewer': 'Override reviewer (some reviewer demands are out of scope or unachievable)',
|
|
70
|
+
'narrow_scope': 'Narrow scope (task scope reduced to achievable subset)',
|
|
71
|
+
};
|
|
72
|
+
const decisionLabel = decisionLabels[decision || ''] || decision || 'unknown';
|
|
73
|
+
return `
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## COORDINATOR INTERVENTION
|
|
77
|
+
|
|
78
|
+
A coordinator has reviewed the rejection history for this task and made the following decision:
|
|
79
|
+
|
|
80
|
+
**Decision:** ${decisionLabel}
|
|
81
|
+
|
|
82
|
+
**Coordinator's Guidance:**
|
|
83
|
+
|
|
84
|
+
${guidance}
|
|
85
|
+
|
|
86
|
+
**You MUST consider this when making your decision:**
|
|
87
|
+
- If the coordinator decided **override_reviewer**: do NOT re-raise the issues the coordinator flagged as out of scope or unachievable. Those demands have been ruled invalid.
|
|
88
|
+
- If the coordinator decided **narrow_scope**: evaluate the coder's work against the NARROWED scope described above, not the original full scope.
|
|
89
|
+
- If the coordinator decided **guide_coder**: the coder was given specific direction - check whether they followed it.
|
|
90
|
+
- You may still reject for NEW issues not addressed by the coordinator, but do not contradict the coordinator's ruling.
|
|
91
|
+
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Generate test coverage instructions if required
|
|
96
|
+
* Coverage is scoped to MODIFIED FILES ONLY - not global project coverage
|
|
97
|
+
*/
|
|
98
|
+
function getTestCoverageInstructions(config, modifiedFiles) {
|
|
99
|
+
if (!config.quality?.tests?.required) {
|
|
100
|
+
return '';
|
|
101
|
+
}
|
|
102
|
+
const minCoverage = config.quality.tests.minCoverage ?? 80;
|
|
103
|
+
const filesScope = modifiedFiles && modifiedFiles.length > 0
|
|
104
|
+
? `- Coverage applies to files MODIFIED IN THIS TASK:\n${modifiedFiles.map(f => ` - ${f}`).join('\n')}`
|
|
105
|
+
: '- Coverage applies to the files modified in this task';
|
|
106
|
+
return `
|
|
107
|
+
|
|
108
|
+
## Test Coverage (REQUIRED - SCOPED TO THIS TASK)
|
|
109
|
+
|
|
110
|
+
**This project requires tests for new code.**
|
|
111
|
+
|
|
112
|
+
${filesScope}
|
|
113
|
+
- Target coverage for THIS TASK's modified files: ${minCoverage}%
|
|
114
|
+
- Tests must exercise the new/changed code paths
|
|
115
|
+
- **DO NOT demand global/overall project coverage from a single task**
|
|
116
|
+
- Other modules' coverage is tracked separately and is NOT this task's responsibility
|
|
117
|
+
- REJECT only if tests for the NEW CODE in this task are missing or inadequate
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Generate the reviewer prompt
|
|
122
|
+
*/
|
|
123
|
+
export function generateReviewerPrompt(context) {
|
|
124
|
+
const { task, projectPath, reviewerModel, gitDiff, modifiedFiles, sectionTasks, rejectionHistory, submissionNotes, config, coordinatorGuidance, coordinatorDecision } = context;
|
|
125
|
+
// Format coder's submission notes if present
|
|
126
|
+
const submissionNotesSection = submissionNotes
|
|
127
|
+
? `
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Coder's Notes
|
|
131
|
+
|
|
132
|
+
The coder included these notes when submitting for review:
|
|
133
|
+
|
|
134
|
+
> ${submissionNotes}
|
|
135
|
+
|
|
136
|
+
**CRITICAL: If the coder claims work already exists:**
|
|
137
|
+
1. **DO NOT reject just because the diff is empty or only shows version bumps**
|
|
138
|
+
2. If a commit hash is mentioned, run \`git show <hash>\` to verify the work
|
|
139
|
+
3. Check if the files/functionality described actually exist in the codebase
|
|
140
|
+
4. If the existing work fulfills the specification: **APPROVE**
|
|
141
|
+
5. If gaps remain: specify exactly what's missing, don't ask for re-implementation
|
|
142
|
+
`
|
|
143
|
+
: '';
|
|
144
|
+
const sourceContent = getSourceFileContent(projectPath, task.source_file);
|
|
145
|
+
const fileAnchorSection = buildFileAnchorSection(task);
|
|
146
|
+
// Truncate diff if too long (max 20000 chars per spec)
|
|
147
|
+
let diffContent = gitDiff;
|
|
148
|
+
if (diffContent.length > 20000) {
|
|
149
|
+
diffContent = diffContent.substring(0, 20000) + '\n\n[Diff truncated]';
|
|
150
|
+
}
|
|
151
|
+
const filesListFormatted = modifiedFiles.length > 0
|
|
152
|
+
? modifiedFiles.map(f => `- ${f}`).join('\n')
|
|
153
|
+
: 'No files modified';
|
|
154
|
+
return `# TASK: ${task.id.substring(0, 8)} - ${task.title}
|
|
155
|
+
# Status: review | Rejections: ${task.rejection_count}/15
|
|
156
|
+
|
|
157
|
+
You are a REVIEWER in an automated task execution system. Your job is to verify the coder's implementation matches the specification.
|
|
158
|
+
|
|
159
|
+
**Follow the project's existing architecture.** If the coder's implementation follows the patterns already established in the codebase (as described in AGENTS.md), do not reject for architectural style differences. Focus on correctness and spec compliance.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Task Information
|
|
164
|
+
|
|
165
|
+
**Task ID:** ${task.id}
|
|
166
|
+
**Title:** ${task.title}
|
|
167
|
+
**Rejection Count:** ${task.rejection_count}/15
|
|
168
|
+
**Project:** ${projectPath}
|
|
169
|
+
${fileAnchorSection}${formatSectionTasks(task.id, sectionTasks)}${formatRejectionHistory(rejectionHistory)}${submissionNotesSection}${formatCoordinatorGuidance(coordinatorGuidance, coordinatorDecision)}
|
|
170
|
+
## Original Specification
|
|
171
|
+
|
|
172
|
+
From ${task.source_file ?? '(not specified)'}:
|
|
173
|
+
|
|
174
|
+
${sourceContent}
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Changes Made by Coder
|
|
179
|
+
|
|
180
|
+
\`\`\`diff
|
|
181
|
+
${diffContent}
|
|
182
|
+
\`\`\`
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Files Modified
|
|
187
|
+
|
|
188
|
+
${filesListFormatted}
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Review Checklist
|
|
193
|
+
|
|
194
|
+
Answer these questions:
|
|
195
|
+
1. Does the implementation match the specification?
|
|
196
|
+
2. Are there bugs or logic errors?
|
|
197
|
+
3. Are tests present and adequate?
|
|
198
|
+
4. Does code follow AGENTS.md guidelines?
|
|
199
|
+
5. Are all files under 500 lines?
|
|
200
|
+
|
|
201
|
+
## Security Review
|
|
202
|
+
|
|
203
|
+
**Check the coder's NEW or CHANGED code for security vulnerabilities.**
|
|
204
|
+
|
|
205
|
+
**Scope rule:** Only evaluate code in the diff. Pre-existing patterns in unchanged code are NOT the coder's responsibility — note them as advisory but do NOT reject for them. If the coder follows an existing pattern already in the codebase, that is acceptable even if the pattern is imperfect.
|
|
206
|
+
|
|
207
|
+
Check for:
|
|
208
|
+
- **Injection attacks**: User input concatenated directly into SQL strings (instead of parameterized queries), or user input interpolated into shell command strings. String interpolation of hardcoded constants or internal config values is NOT injection.
|
|
209
|
+
- **Shell safety**: When passing user-controlled or external values as arguments to commands, prefer array-based APIs (e.g., Node \`execFileSync(cmd, [args])\`, Python \`subprocess.run([cmd, args])\` without \`shell=True\`). Using \`execSync\` with hardcoded commands, shell features (pipes, chaining), or user-configured hook commands is acceptable.
|
|
210
|
+
- **Path traversal**: File paths from end-user CLI input should be validated to stay within the expected directory. Internally-constructed paths to known locations (\`~/.steroids/\`, temp dirs, config paths) are fine.
|
|
211
|
+
- **Secrets exposure**: No real API keys, tokens, or passwords hardcoded in source. Placeholder/example values, checksums, env var names, and test fixtures are NOT secrets.
|
|
212
|
+
- **Unsafe code execution**: No \`eval()\`, \`new Function()\`, or dynamic code execution on any input. \`JSON.parse\` is safe to use — validate the parsed result before using it in security-sensitive operations (file paths, shell commands, SQL). Simple \`JSON.parse\` with try/catch is acceptable.
|
|
213
|
+
- **Permission escalation**: Do not set overly permissive modes (e.g., 0o777) or disable security controls. Default permissions (0o644 files, 0o755 executables) are acceptable.
|
|
214
|
+
- **Information leakage**: For HTTP/API responses, do not expose stack traces or internal paths. For CLI output, showing file paths and error details is expected and helpful — only ensure credentials are never logged.
|
|
215
|
+
- **Dependency hygiene** (advisory only): If new dependencies are added, list them as a note and suggest alternatives if known. Do NOT reject solely for dependency choice.
|
|
216
|
+
|
|
217
|
+
If you find a genuine vulnerability where an attacker could exploit the NEW code to gain unauthorized access, execute arbitrary code, or exfiltrate data — **REJECT** with a clear explanation and remediation steps. If the coder's notes explain why a flagged pattern is safe in context, evaluate their justification before rejecting. If you are uncertain, describe the concern as a security note rather than rejecting on uncertainty alone.
|
|
218
|
+
${getTestCoverageInstructions(config, modifiedFiles)}
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Your Decision
|
|
222
|
+
|
|
223
|
+
You MUST output ONE of these decision statements clearly:
|
|
224
|
+
|
|
225
|
+
### APPROVE (implementation is correct)
|
|
226
|
+
If the code correctly implements the specification:
|
|
227
|
+
**Output:** "APPROVE - Implementation meets all requirements"
|
|
228
|
+
|
|
229
|
+
### APPROVE WITH NOTE (minor issues, not blocking)
|
|
230
|
+
If you have minor concerns but the implementation is acceptable:
|
|
231
|
+
**Output:** "APPROVE - <your feedback here>"
|
|
232
|
+
|
|
233
|
+
### SKIP (external setup required)
|
|
234
|
+
If the coder requested a SKIP and it's legitimate:
|
|
235
|
+
1. **Verify** the spec section says SKIP, MANUAL, or requires external action
|
|
236
|
+
2. **Verify** the skip notes explain WHAT human action is needed
|
|
237
|
+
3. If valid:
|
|
238
|
+
**Output:** "SKIP - Verified: spec says SKIP. Human must [action]. Approved to unblock pipeline."
|
|
239
|
+
|
|
240
|
+
### REJECT (needs changes)
|
|
241
|
+
If there are issues that must be fixed:
|
|
242
|
+
**Output:** "REJECT" followed by specific feedback
|
|
243
|
+
|
|
244
|
+
**CRITICAL: Format rejection feedback with checkboxes for EACH actionable item:**
|
|
245
|
+
|
|
246
|
+
\`\`\`
|
|
247
|
+
- [ ] Fix type error in src/foo.ts:42 - change \`string\` to \`number\`
|
|
248
|
+
- [ ] Add missing null check in src/bar.ts:15 before accessing \`.data\`
|
|
249
|
+
- [ ] Add unit test for the new \`processItem()\` function
|
|
250
|
+
- [ ] Remove unused import on line 3
|
|
251
|
+
\`\`\`
|
|
252
|
+
|
|
253
|
+
**Why checkboxes?** The coder will use these to verify they've addressed EVERY issue before resubmitting. Each checkbox = one specific action.
|
|
254
|
+
|
|
255
|
+
**Rules for rejection notes:**
|
|
256
|
+
1. One checkbox per actionable item (not paragraphs of prose)
|
|
257
|
+
2. Include file:line references where applicable
|
|
258
|
+
3. Be specific about WHAT to change, not just WHAT is wrong
|
|
259
|
+
4. Group related items logically
|
|
260
|
+
|
|
261
|
+
This will be rejection #${task.rejection_count + 1}.
|
|
262
|
+
|
|
263
|
+
### DISPUTE (fundamental disagreement)
|
|
264
|
+
Only if there's a genuine specification or architecture conflict:
|
|
265
|
+
**Output:** "DISPUTE - <explanation>"
|
|
266
|
+
|
|
267
|
+
Use sparingly. Most issues should be resolved via reject/fix cycle.
|
|
268
|
+
|
|
269
|
+
**The orchestrator will parse your decision and update task status accordingly. Do NOT run any \`steroids tasks\` commands.**
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## CRITICAL RULES
|
|
274
|
+
|
|
275
|
+
1. **NEVER modify code yourself** - only review it
|
|
276
|
+
2. **Be specific in rejection notes** - vague feedback wastes cycles
|
|
277
|
+
3. **Approve if it works** - don't reject for style preferences
|
|
278
|
+
4. **You MUST clearly state your decision** (APPROVE/REJECT/DISPUTE/SKIP)
|
|
279
|
+
5. **Verify coder's claims** - if coder says work exists in a commit, CHECK IT before rejecting
|
|
280
|
+
6. **Empty diff ≠ no work** - work may exist in earlier commits the coder referenced
|
|
281
|
+
7. **SKIP requests are valid** - if spec says SKIP/manual, approve the skip to unblock the pipeline
|
|
282
|
+
8. **Don't reject skips for infrastructure tasks** - Cloud SQL, GKE, etc. truly need human action
|
|
283
|
+
9. **DO NOT run any \`steroids tasks\` commands** - the orchestrator handles all status updates
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Feedback Notes
|
|
288
|
+
|
|
289
|
+
**After making your decision**, you may include feedback notes for anything a human should review later. These are advisory only and will NOT block the pipeline.
|
|
290
|
+
|
|
291
|
+
Include feedback notes when you notice:
|
|
292
|
+
- A pre-existing security concern in unchanged code
|
|
293
|
+
- A minor design dispute even if you approved
|
|
294
|
+
- Something uncertain that a human should verify
|
|
295
|
+
- A suggestion the coder should consider for a future task
|
|
296
|
+
|
|
297
|
+
Simply include these as notes in your decision output. They will be logged for human review.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Review Now
|
|
302
|
+
|
|
303
|
+
Examine the diff above, then clearly state your decision (APPROVE/REJECT/DISPUTE/SKIP) with any notes.
|
|
304
|
+
The orchestrator will parse your decision and update task status accordingly.
|
|
305
|
+
`;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Generate the reviewer prompt for a batch of tasks
|
|
309
|
+
*/
|
|
310
|
+
export function generateBatchReviewerPrompt(context) {
|
|
311
|
+
const { tasks, projectPath, sectionName, gitDiff, modifiedFiles, config } = context;
|
|
312
|
+
// Build task specs for each task
|
|
313
|
+
const taskSpecs = tasks.map((task, index) => {
|
|
314
|
+
const sourceContent = getSourceFileContent(projectPath, task.source_file);
|
|
315
|
+
return `
|
|
316
|
+
### Task ${index + 1}: ${task.title}
|
|
317
|
+
**Task ID:** ${task.id}
|
|
318
|
+
**Spec File:** ${task.source_file ?? '(not specified)'}
|
|
319
|
+
|
|
320
|
+
${sourceContent}
|
|
321
|
+
`;
|
|
322
|
+
}).join('\n---\n');
|
|
323
|
+
// Truncate diff if too long
|
|
324
|
+
let diffContent = gitDiff;
|
|
325
|
+
if (diffContent.length > 30000) {
|
|
326
|
+
diffContent = diffContent.substring(0, 30000) + '\n\n[Diff truncated - review individual commits for full changes]';
|
|
327
|
+
}
|
|
328
|
+
const filesListFormatted = modifiedFiles.length > 0
|
|
329
|
+
? modifiedFiles.map(f => `- ${f}`).join('\n')
|
|
330
|
+
: 'No files modified';
|
|
331
|
+
const taskIds = tasks.map(t => t.id);
|
|
332
|
+
return `# STEROIDS BATCH REVIEWER TASK
|
|
333
|
+
|
|
334
|
+
You are a REVIEWER reviewing MULTIPLE tasks from section "${sectionName}".
|
|
335
|
+
|
|
336
|
+
**IMPORTANT:** Review all changes as a cohesive unit. The coder implemented all these tasks together.
|
|
337
|
+
|
|
338
|
+
## Section: ${sectionName}
|
|
339
|
+
**Total Tasks:** ${tasks.length}
|
|
340
|
+
**Project:** ${projectPath}
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## TASKS BEING REVIEWED
|
|
345
|
+
|
|
346
|
+
${taskSpecs}
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Combined Changes (All Tasks)
|
|
351
|
+
|
|
352
|
+
\`\`\`diff
|
|
353
|
+
${diffContent}
|
|
354
|
+
\`\`\`
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## Files Modified
|
|
359
|
+
|
|
360
|
+
${filesListFormatted}
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
${getTestCoverageInstructions(config, modifiedFiles)}
|
|
364
|
+
## Review Checklist (For Each Task)
|
|
365
|
+
|
|
366
|
+
For EACH task, verify:
|
|
367
|
+
1. Does the implementation match the specification?
|
|
368
|
+
2. Are there bugs, security issues, or logic errors?
|
|
369
|
+
3. Are tests present and adequate (if project requires tests)?
|
|
370
|
+
4. Does code follow project guidelines?
|
|
371
|
+
5. Are all files under 500 lines?
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## YOUR WORKFLOW
|
|
376
|
+
|
|
377
|
+
Review all tasks, then state your decision for EACH one:
|
|
378
|
+
|
|
379
|
+
**For each task that passes review:**
|
|
380
|
+
Output: "APPROVE <task-id> - Implementation correct"
|
|
381
|
+
|
|
382
|
+
**For each task that needs changes:**
|
|
383
|
+
Output: "REJECT <task-id>" followed by checkbox list:
|
|
384
|
+
\`\`\`
|
|
385
|
+
- [ ] specific issue 1
|
|
386
|
+
- [ ] specific issue 2
|
|
387
|
+
\`\`\`
|
|
388
|
+
|
|
389
|
+
**CRITICAL:** You MUST state a decision for EACH task. Use checkboxes in rejection notes. The orchestrator will parse your decisions and update task status accordingly.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## TASK IDS
|
|
394
|
+
|
|
395
|
+
${taskIds.map((id, i) => `- Task ${i + 1}: ${id}`).join('\n')}
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## CRITICAL RULES
|
|
400
|
+
|
|
401
|
+
1. **NEVER modify code yourself** - only review it
|
|
402
|
+
2. **Review ALL tasks** - don't skip any
|
|
403
|
+
3. **Be specific in rejection notes** - use checkboxes for each issue
|
|
404
|
+
4. **Consider tasks as a unit** - they were implemented together
|
|
405
|
+
5. **You MUST state approve/reject for EACH task**
|
|
406
|
+
6. **DO NOT run \`steroids tasks\` commands** - the orchestrator handles status updates
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Review Now
|
|
411
|
+
|
|
412
|
+
Examine the diff, verify each task's specification is met, then clearly state your decision for each task.
|
|
413
|
+
The orchestrator will parse your decisions and update task status accordingly.
|
|
414
|
+
`;
|
|
415
|
+
}
|
|
416
|
+
//# sourceMappingURL=reviewer.js.map
|
|
@@ -0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;;;EAGlB,2BAA2B,CAAC,MAAM,EAAE,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgClD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;CAmB5D,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Provider
|
|
3
|
+
* Implementation for Anthropic's Claude CLI
|
|
4
|
+
*/
|
|
5
|
+
import { BaseAIProvider, type InvokeOptions, type InvokeResult, type ModelInfo } from './interface.js';
|
|
6
|
+
/**
|
|
7
|
+
* Claude AI Provider implementation
|
|
8
|
+
*/
|
|
9
|
+
export declare class ClaudeProvider extends BaseAIProvider {
|
|
10
|
+
readonly name = "claude";
|
|
11
|
+
readonly displayName = "Anthropic Claude";
|
|
12
|
+
/**
|
|
13
|
+
* Write prompt to a temporary file
|
|
14
|
+
*/
|
|
15
|
+
private writePromptFile;
|
|
16
|
+
/**
|
|
17
|
+
* Clean up temporary prompt file
|
|
18
|
+
*/
|
|
19
|
+
private cleanupPromptFile;
|
|
20
|
+
/**
|
|
21
|
+
* Invoke Claude CLI with a prompt
|
|
22
|
+
*/
|
|
23
|
+
invoke(prompt: string, options: InvokeOptions): Promise<InvokeResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Invoke Claude CLI with a prompt file using the invocation template
|
|
26
|
+
*/
|
|
27
|
+
private invokeWithFile;
|
|
28
|
+
/**
|
|
29
|
+
* Check if Claude CLI is available
|
|
30
|
+
*/
|
|
31
|
+
isAvailable(): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* List available model IDs
|
|
34
|
+
*/
|
|
35
|
+
listModels(): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Get detailed model information
|
|
38
|
+
*/
|
|
39
|
+
getModelInfo(): ModelInfo[];
|
|
40
|
+
/**
|
|
41
|
+
* Get the default model for a role
|
|
42
|
+
*/
|
|
43
|
+
getDefaultModel(role: 'orchestrator' | 'coder' | 'reviewer'): string;
|
|
44
|
+
/**
|
|
45
|
+
* Get the default invocation template for Claude CLI
|
|
46
|
+
*/
|
|
47
|
+
getDefaultInvocationTemplate(): string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a Claude provider instance
|
|
51
|
+
*/
|
|
52
|
+
export declare function createClaudeProvider(): ClaudeProvider;
|
|
53
|
+
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/providers/claude.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AA+CxB;;GAEG;AACH,qBAAa,cAAe,SAAQ,cAAc;IAChD,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,WAAW,sBAAsB;IAE1C;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAyB3E;;OAEG;IACH,OAAO,CAAC,cAAc;IAoFtB;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAyBrC;;OAEG;IACH,UAAU,IAAI,MAAM,EAAE;IAItB;;OAEG;IACH,YAAY,IAAI,SAAS,EAAE;IAI3B;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM;IAIpE;;OAEG;IACH,4BAA4B,IAAI,MAAM;CAGvC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAErD"}
|