-
Notifications
You must be signed in to change notification settings - Fork 109
Agent integration: Pi coding agent #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package pi | ||
|
|
||
| import ( | ||
| "context" | ||
| "path/filepath" | ||
|
|
||
| "github.com/entireio/cli/cmd/entire/cli/agent" | ||
| "github.com/entireio/cli/cmd/entire/cli/session" | ||
| ) | ||
|
|
||
| type PiAgent struct{} | ||
|
|
||
| func NewPiAgent() *PiAgent { | ||
| return &PiAgent{} | ||
| } | ||
|
|
||
| func (a *PiAgent) Name() string { | ||
| return "Pi" | ||
| } | ||
|
|
||
| func (a *PiAgent) Detect(ctx context.Context, repoRoot string) (bool, error) { | ||
| // Pi usually has a ~/.pi directory or project local .pi | ||
| // Simplified detection for skeleton | ||
| return true, nil | ||
| } | ||
|
|
||
| func (a *PiAgent) InstallHooks(ctx context.Context, repoRoot string) error { | ||
| return nil | ||
| } | ||
|
|
||
| func (a *PiAgent) UninstallHooks(ctx context.Context, repoRoot string) error { | ||
| return nil | ||
| } | ||
|
|
||
| func (a *PiAgent) ReadSession(ctx context.Context, sessionID string) (*agent.SessionMetadata, error) { | ||
| return &agent.SessionMetadata{ | ||
| SessionID: sessionID, | ||
| }, nil | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PiAgent methods don't match the Agent interfaceHigh Severity
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detect unconditionally returns true for all repos
Medium Severity
The
Detectmethod (intended asDetectPresence) always returnstrue, nilregardless of whether the Pi agent is actually installed. The comment mentions checking for~/.pior.pidirectories, but no such check is performed. In theDetect()function inregistry.go, all registered agents are iterated and the first one whoseDetectPresencereturnstrueis selected — so an always-true implementation would cause Pi to be incorrectly auto-detected as the active agent in every repository.