Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linters:
- depguard
- dogsled
- durationcheck
- embeddedstructfieldcheck
- errcheck
- errname
- errorlint
Expand All @@ -20,6 +21,7 @@ linters:
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- godoclint
- gochecknoinits
- gochecksumtype
- gocritic
Expand Down
1 change: 1 addition & 0 deletions cmd/root/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const defaultJudgeModel = "anthropic/claude-opus-4-5-20251101"

type evalFlags struct {
evaluation.Config

runConfig config.RuntimeConfig
outputDir string
}
Expand Down
1 change: 1 addition & 0 deletions pkg/acp/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func getSessionID(ctx context.Context) (string, bool) {
// and edit_file to use the ACP connection for file operations
type FilesystemToolset struct {
*builtin.FilesystemTool

agent *Agent
workingDir string
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,11 +1038,11 @@ func (a *App) ExportHTML(ctx context.Context, filename string) (string, error) {
return export.SessionToFile(a.session, agentInfo.Description, filename)
}

// UpdateSessionTitle updates the current session's title and persists it.
// It works with both local and remote runtimes.
// ErrTitleGenerating is returned when attempting to set a title while generation is in progress.
var ErrTitleGenerating = errors.New("title generation in progress, please wait")

// UpdateSessionTitle updates the current session's title and persists it.
// It works with both local and remote runtimes.
func (a *App) UpdateSessionTitle(ctx context.Context, title string) error {
if a.session == nil {
return errors.New("no active session")
Expand Down
1 change: 1 addition & 0 deletions pkg/content/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
// See https://github.com/opencontainers/image-spec/blob/v1.1.1/manifest.md#guidelines-for-artifact-usage
type artifactImage struct {
v1.Image

artifactType string
}

Expand Down
1 change: 1 addition & 0 deletions pkg/evaluation/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
// Runner runs evaluations against an agent.
type Runner struct {
Config

agentSource config.Source
judge *Judge
runConfig *config.RuntimeConfig
Expand Down
1 change: 1 addition & 0 deletions pkg/evaluation/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// InputSession wraps a session with its source path for evaluation loading.
type InputSession struct {
*session.Session

SourcePath string // Path to the source eval file (not serialized)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/fake/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ func TestSimulatedStreamCopy_SSEEvents(t *testing.T) {
// notifyWriter wraps an http.ResponseWriter and signals on first Write.
type notifyWriter struct {
http.ResponseWriter

notify chan struct{}
notified bool
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/hooks/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ import (
type EventType string

const (
// PreToolUse is triggered before a tool call executes.
// EventPreToolUse is triggered before a tool call executes.
// Can allow/deny/modify tool calls; can block with feedback.
EventPreToolUse EventType = "pre_tool_use"

// PostToolUse is triggered after a tool completes successfully.
// EventPostToolUse is triggered after a tool completes successfully.
// Can provide validation, feedback, or additional processing.
EventPostToolUse EventType = "post_tool_use"

// SessionStart is triggered when a session begins or resumes.
// EventSessionStart is triggered when a session begins or resumes.
// Can load context, setup environment, install dependencies.
EventSessionStart EventType = "session_start"

// SessionEnd is triggered when a session terminates.
// EventSessionEnd is triggered when a session terminates.
// Can perform cleanup, logging, persist session state.
EventSessionEnd EventType = "session_end"

// OnUserInput is triggered when the agent needs input from the user.
// EventOnUserInput is triggered when the agent needs input from the user.
// Can log, notify, or perform actions before user interaction.
EventOnUserInput EventType = "on_user_input"

// Stop is triggered when the model finishes its response and is about
// EventStop is triggered when the model finishes its response and is about
// to hand control back to the user. Can perform post-response validation,
// logging, or cleanup.
EventStop EventType = "stop"

// Notification is triggered when the agent emits a notification to the user,
// EventNotification is triggered when the agent emits a notification to the user,
// such as errors or warnings. Can send external notifications or log events.
EventNotification EventType = "notification"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/anthropic/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
// streamAdapter adapts the Anthropic stream to our interface
type streamAdapter struct {
retryableStream[anthropic.MessageStreamEventUnion]

trackUsage bool
toolCall bool
toolID string
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/anthropic/beta_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
// betaStreamAdapter adapts the Anthropic Beta stream to our interface
type betaStreamAdapter struct {
retryableStream[anthropic.BetaRawMessageStreamEventUnion]

trackUsage bool
toolCall bool
toolID string
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/anthropic/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
// It holds the anthropic client and model config
type Client struct {
base.Config

clientFn func(context.Context) (anthropic.Client, error)
lastHTTPResponse *http.Response
fileManager *FileManager
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/bedrock/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
// Client represents a Bedrock client wrapper implementing provider.Provider
type Client struct {
base.Config

bedrockClient *bedrockruntime.Client
cachingSupported bool // Cached at init time for efficiency
}
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/dmr/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const (
// It implements the provider.Provider interface
type Client struct {
base.Config

client openai.Client
baseURL string
httpClient *http.Client
Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/gemini/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
// It implements the provider.Provider interface
type Client struct {
base.Config

clientFn func(context.Context) (*genai.Client, error)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/openai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
// It implements the provider.Provider interface
type Client struct {
base.Config

clientFn func(context.Context) (*openai.Client, error)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/model/provider/rulebased/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type ProviderFactory func(ctx context.Context, modelSpec string, models map[stri
// Client implements the Provider interface for rule-based model routing.
type Client struct {
base.Config

routes []Provider
fallback Provider
index bleve.Index
Expand Down
1 change: 1 addition & 0 deletions pkg/rag/rerank/rerank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
// fakeRerankingProvider implements provider.RerankingProvider for testing.
type fakeRerankingProvider struct {
base.Config

scores []float64
err error
}
Expand Down
1 change: 1 addition & 0 deletions pkg/rag/strategy/vector_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type vectorStoreDB interface {
// It contains base document data plus similarity score.
type VectorSearchResultData struct {
database.Document

Embedding []float64
EmbeddingInput string // Only populated for semantic-embeddings
Similarity float64
Expand Down
Loading
Loading