miyabi-agent-sdk
Version:
Miyabi Autonomous Agent SDK - 7 Agents based on Shikigaku Theory with 100% cost reduction mode
83 lines • 1.95 kB
TypeScript
/**
* PRAgent - PR作成Agent
*
* 識学理論適用:
* - 責任: Draft Pull Requestを作成
* - 権限: ブランチ作成、PR作成(Draft)、ラベル付与
* - 階層: Specialist Layer
*
* Phase 8-2: Real API Integration
*/
import type { GeneratedFile, QualityReport, PullRequest, AgentInput, AgentOutput } from "../types.js";
import { GitHubClient } from "../clients/GitHubClient.js";
export interface PRInput extends AgentInput {
issueNumber: number;
repository: string;
owner: string;
files: GeneratedFile[];
qualityReport: QualityReport;
baseBranch?: string;
useRealAPI?: boolean;
githubClient?: GitHubClient;
}
export interface PROutput extends AgentOutput {
data?: PullRequest;
}
/**
* PRAgent実装
*
* Branch作成 → Files commit → Draft PR作成 → PR本文生成
*/
export declare class PRAgent {
private githubClient?;
constructor(config?: {
githubToken?: string;
});
/**
* メイン実行ロジック
*/
create(input: PRInput): Promise<PROutput>;
/**
* Branch名生成
*/
private generateBranchName;
/**
* Branch作成
*
* Phase 8-2: Real GitHub API integration
*/
private createBranch;
/**
* Files commit
*
* Phase 8-2: Real GitHub API integration
*/
private commitFiles;
/**
* Commit message生成(Conventional Commits準拠)
*/
private generateCommitMessage;
/**
* Commit type推論(Conventional Commits)
*/
private inferCommitType;
/**
* Scope推論(ファイルパスから)
*/
private inferScope;
/**
* PR title生成
*/
private generatePRTitle;
/**
* PR本文生成
*/
private generatePRBody;
/**
* Pull Request作成
*
* Phase 8-2: Real GitHub API integration
*/
private createPullRequest;
}
//# sourceMappingURL=PRAgent.d.ts.map