/** * Scout Agent - SLOP Native * * Watches GitHub/GitLab for PRs and commits in real-time. * Triggers security scans automatically when code changes are detected. * * Tools: * - watch-repo: Start watching a repository for changes * - unwatch-repo: Stop watching a repository * - list-watched: List all watched repositories * - get-events: Get recent code change events * - parse-webhook: Parse incoming GitHub/GitLab webhook * - poll-repo: Manually poll a repo for changes */ import { SLOPAgent } from './base.js'; import { SLOPAgentConfig, SLOPToolCall, SLOPToolResult } from './types.js'; export interface WatchedRepo { id: string; url: string; provider: 'github' | 'gitlab' | 'bitbucket'; owner: string; repo: string; branch?: string; lastCommit?: string; lastChecked?: number; watchSince: number; events: CodeEvent[]; } export interface CodeEvent { id: string; type: 'push' | 'pull_request' | 'merge_request' | 'tag'; repo: string; branch: string; commit: string; author: string; message: string; filesChanged: string[]; additions: number; deletions: number; timestamp: number; url?: string; prNumber?: number; prTitle?: string; prState?: 'open' | 'closed' | 'merged'; metadata?: Record; } export interface WebhookPayload { provider: 'github' | 'gitlab'; event: string; payload: Record; } export declare class ScoutAgent extends SLOPAgent { private watchedRepos; private allEvents; private pollTimers; private githubToken?; private gitlabToken?; private scannerUrl?; constructor(config: SLOPAgentConfig); handleToolCall(call: SLOPToolCall): Promise; /** * Start watching a repository */ private watchRepo; /** * Stop watching a repository */ private unwatchRepo; /** * List all watched repositories */ private listWatched; /** * Get recent code events */ private getEvents; /** * Parse incoming webhook */ private parseWebhook; /** * Poll a repository for changes */ private pollRepo; /** * Trigger a security scan for an event */ private triggerScan; private parseRepoUrl; private getLatestCommit; private getGitHubLatestCommit; private getGitLabLatestCommit; private getCommitsSince; private getGitHubCommitsSince; private parseGitHubWebhook; private parseGitLabWebhook; /** * Clean up on shutdown */ stop(): Promise; } export declare function createScoutAgent(port?: number, coordinatorUrl?: string): ScoutAgent;