miyabi-agent-sdk
Version:
Miyabi Autonomous Agent SDK - 7 Agents based on Shikigaku Theory with 100% cost reduction mode
114 lines • 2.81 kB
TypeScript
/**
* GitHubClient - GitHub API wrapper for Agent SDK
*
* Phase 8-2: Real GitHub API integration
*/
export interface GitHubIssue {
number: number;
title: string;
body: string | null;
state: string;
labels: Array<{
name: string;
}>;
created_at: string;
updated_at: string;
}
export interface GitHubFile {
path: string;
content: string;
sha: string;
}
export interface PullRequestInfo {
number: number;
html_url: string;
state: string;
}
/**
* GitHubClient for Agent SDK
*
* Provides GitHub API integration for:
* - Issue operations (IssueAgent)
* - File operations (CodeGenAgent)
* - PR operations (PRAgent)
*/
export declare class GitHubClient {
private octokit;
constructor(token?: string);
/**
* Get Issue from GitHub
*
* Used by IssueAgent for real issue data
*/
getIssue(owner: string, repo: string, issueNumber: number): Promise<GitHubIssue>;
/**
* Add labels to Issue
*
* Used by IssueAgent for automatic label application
*/
addLabels(owner: string, repo: string, issueNumber: number, labels: string[]): Promise<void>;
/**
* Get file content from repository
*
* Used by CodeGenAgent for context gathering
*/
getFileContent(owner: string, repo: string, path: string, ref?: string): Promise<GitHubFile | null>;
/**
* Create branch
*
* Used by PRAgent for PR creation
*/
createBranch(owner: string, repo: string, branchName: string, baseBranch?: string): Promise<void>;
/**
* Commit files to branch using Git Tree API
*
* Used by PRAgent for committing generated code
*/
commitFiles(params: {
owner: string;
repo: string;
branch: string;
files: Array<{
path: string;
content: string;
}>;
message: string;
}): Promise<string>;
/**
* Create Pull Request
*
* Used by PRAgent for Draft PR creation
*/
createPullRequest(params: {
owner: string;
repo: string;
title: string;
body: string;
head: string;
base: string;
draft?: boolean;
}): Promise<PullRequestInfo>;
/**
* Add comment to Issue/PR
*
* Used by Agents for status updates
*/
addComment(owner: string, repo: string, issueNumber: number, comment: string): Promise<void>;
/**
* Check rate limit
*
* Used for Rate Limit monitoring
*/
checkRateLimit(): Promise<{
remaining: number;
limit: number;
reset: Date;
}>;
/**
* Wait if rate limit is low
*
* Automatic rate limit protection
*/
waitIfNeeded(): Promise<void>;
}
//# sourceMappingURL=GitHubClient.d.ts.map