Skip to content
Merged
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
6 changes: 4 additions & 2 deletions agent/claude/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module github.com/bborbe/agent/agent/claude

go 1.26.3

replace github.com/bborbe/agent/lib => ../../lib
replace (
github.com/bborbe/agent/lib => ../../lib
)

require (
github.com/bborbe/agent/lib v0.62.3
Expand All @@ -12,7 +14,7 @@ require (
github.com/bborbe/sentry v1.9.17
github.com/bborbe/service v1.10.0
github.com/bborbe/time v1.27.0
github.com/bborbe/vault-cli v0.64.3
github.com/bborbe/vault-cli v0.67.5
github.com/golang/glog v1.2.5
github.com/onsi/ginkgo/v2 v2.29.0
github.com/onsi/gomega v1.41.0
Expand Down
4 changes: 2 additions & 2 deletions agent/claude/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/bborbe/time v1.27.0 h1:8iP02hL/c/DSx0VSUucl+Xag1DN/Gw6ktykTSf0t9/s=
github.com/bborbe/time v1.27.0/go.mod h1:86k09AnUTL/ZifJH/kM3Cks3F15qpguuoCyiTujeyTk=
github.com/bborbe/validation v1.4.13 h1:wpbMgKT6qcyzwZ8iIE2CTp+JDHwZ/9kSvZV5gIF5K7I=
github.com/bborbe/validation v1.4.13/go.mod h1:fLQ2m4py+juzQeS2vk9BrPztrSH8XxhvPBHGLA/pTmA=
github.com/bborbe/vault-cli v0.64.3 h1:HHN2N6GhBCxdQB8Me++wSPS81fKMLHmJjsyxWf06K7M=
github.com/bborbe/vault-cli v0.64.3/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/bborbe/vault-cli v0.67.5 h1:rMVU82q8aUwf8yvz7SwvExWLY7MZEotscM9basaTOMM=
github.com/bborbe/vault-cli v0.67.5/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand Down
3 changes: 2 additions & 1 deletion agent/claude/pkg/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/bborbe/errors"
libkafka "github.com/bborbe/kafka"
libtime "github.com/bborbe/time"
"github.com/bborbe/vault-cli/pkg/domain"

"github.com/bborbe/agent/agent/claude/pkg/prompts"
agentlib "github.com/bborbe/agent/lib"
Expand Down Expand Up @@ -122,7 +123,7 @@ func CreateAgentFromRunner(
})
return agentlib.NewAgent(
agentlib.NewPhase("planning", step),
agentlib.NewPhase("in_progress", step),
agentlib.NewPhase(domain.TaskPhaseExecution, step),
agentlib.NewPhase("ai_review", step),
)
}
Expand Down
6 changes: 4 additions & 2 deletions agent/code/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module github.com/bborbe/agent/agent/code

go 1.26.3

replace github.com/bborbe/agent/lib => ../../lib
replace (
github.com/bborbe/agent/lib => ../../lib
)

require (
github.com/bborbe/agent/lib v0.0.0
Expand All @@ -12,7 +14,7 @@ require (
github.com/bborbe/sentry v1.9.17
github.com/bborbe/service v1.10.0
github.com/bborbe/time v1.27.0
github.com/bborbe/vault-cli v0.64.3
github.com/bborbe/vault-cli v0.67.5
github.com/golang/glog v1.2.5
github.com/onsi/ginkgo/v2 v2.29.0
github.com/onsi/gomega v1.41.0
Expand Down
4 changes: 2 additions & 2 deletions agent/code/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/bborbe/time v1.27.0 h1:8iP02hL/c/DSx0VSUucl+Xag1DN/Gw6ktykTSf0t9/s=
github.com/bborbe/time v1.27.0/go.mod h1:86k09AnUTL/ZifJH/kM3Cks3F15qpguuoCyiTujeyTk=
github.com/bborbe/validation v1.4.13 h1:wpbMgKT6qcyzwZ8iIE2CTp+JDHwZ/9kSvZV5gIF5K7I=
github.com/bborbe/validation v1.4.13/go.mod h1:fLQ2m4py+juzQeS2vk9BrPztrSH8XxhvPBHGLA/pTmA=
github.com/bborbe/vault-cli v0.64.3 h1:HHN2N6GhBCxdQB8Me++wSPS81fKMLHmJjsyxWf06K7M=
github.com/bborbe/vault-cli v0.64.3/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/bborbe/vault-cli v0.67.5 h1:rMVU82q8aUwf8yvz7SwvExWLY7MZEotscM9basaTOMM=
github.com/bborbe/vault-cli v0.67.5/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand Down
3 changes: 2 additions & 1 deletion agent/code/pkg/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/bborbe/errors"
libkafka "github.com/bborbe/kafka"
libtime "github.com/bborbe/time"
"github.com/bborbe/vault-cli/pkg/domain"

"github.com/bborbe/agent/agent/code/pkg/steps"
agentlib "github.com/bborbe/agent/lib"
Expand Down Expand Up @@ -71,7 +72,7 @@ func CreateFileResultDeliverer(filePath string) agentlib.ResultDeliverer {
func CreateAgent() *agentlib.Agent {
return agentlib.NewAgent(
agentlib.NewPhase("planning", steps.NewPlanStep()),
agentlib.NewPhase("in_progress", steps.NewExecuteStep()),
agentlib.NewPhase(domain.TaskPhaseExecution, steps.NewExecuteStep()),
agentlib.NewPhase("ai_review", steps.NewVerifyStep()),
)
}
Expand Down
9 changes: 5 additions & 4 deletions agent/code/pkg/steps/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"

"github.com/bborbe/errors"
"github.com/bborbe/vault-cli/pkg/domain"

agentlib "github.com/bborbe/agent/lib"
)
Expand Down Expand Up @@ -72,13 +73,13 @@ func (s *PlanStep) Run(ctx context.Context, md *agentlib.Markdown) (*agentlib.Re
plan := Plan{Operation: op, A: a, B: b}
section, err := agentlib.MarshalSectionTyped(ctx, "## Plan", plan)
if err != nil {
return nil, errors.Wrapf(ctx, err, "marshal plan")
return nil, errors.Wrap(ctx, err, "marshal plan")
}
md.ReplaceSection(section)

return &agentlib.Result{
Status: agentlib.AgentStatusDone,
NextPhase: "in_progress",
NextPhase: string(domain.TaskPhaseExecution),
}, nil
}

Expand Down Expand Up @@ -112,7 +113,7 @@ func (s *ExecuteStep) Run(ctx context.Context, md *agentlib.Markdown) (*agentlib
result := Result{Operation: plan.Operation, Value: value}
section, err := agentlib.MarshalSectionTyped(ctx, "## Result", result)
if err != nil {
return nil, errors.Wrapf(ctx, err, "marshal result")
return nil, errors.Wrap(ctx, err, "marshal result")
}
md.ReplaceSection(section)

Expand Down Expand Up @@ -163,7 +164,7 @@ func (s *VerifyStep) Run(ctx context.Context, md *agentlib.Markdown) (*agentlib.

section, err := agentlib.MarshalSectionTyped(ctx, "## Review", review)
if err != nil {
return nil, errors.Wrapf(ctx, err, "marshal review")
return nil, errors.Wrap(ctx, err, "marshal review")
}
md.ReplaceSection(section)

Expand Down
6 changes: 4 additions & 2 deletions agent/gemini/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module github.com/bborbe/agent/agent/gemini

go 1.26.3

replace github.com/bborbe/agent/lib => ../../lib
replace (
github.com/bborbe/agent/lib => ../../lib
)

require (
github.com/bborbe/agent/lib v0.0.0
Expand All @@ -12,7 +14,7 @@ require (
github.com/bborbe/sentry v1.9.17
github.com/bborbe/service v1.10.0
github.com/bborbe/time v1.27.0
github.com/bborbe/vault-cli v0.64.3
github.com/bborbe/vault-cli v0.67.5
github.com/golang/glog v1.2.5
github.com/onsi/ginkgo/v2 v2.29.0
github.com/onsi/gomega v1.41.0
Expand Down
4 changes: 2 additions & 2 deletions agent/gemini/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ github.com/bborbe/time v1.27.0 h1:8iP02hL/c/DSx0VSUucl+Xag1DN/Gw6ktykTSf0t9/s=
github.com/bborbe/time v1.27.0/go.mod h1:86k09AnUTL/ZifJH/kM3Cks3F15qpguuoCyiTujeyTk=
github.com/bborbe/validation v1.4.13 h1:wpbMgKT6qcyzwZ8iIE2CTp+JDHwZ/9kSvZV5gIF5K7I=
github.com/bborbe/validation v1.4.13/go.mod h1:fLQ2m4py+juzQeS2vk9BrPztrSH8XxhvPBHGLA/pTmA=
github.com/bborbe/vault-cli v0.64.3 h1:HHN2N6GhBCxdQB8Me++wSPS81fKMLHmJjsyxWf06K7M=
github.com/bborbe/vault-cli v0.64.3/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/bborbe/vault-cli v0.67.5 h1:rMVU82q8aUwf8yvz7SwvExWLY7MZEotscM9basaTOMM=
github.com/bborbe/vault-cli v0.67.5/go.mod h1:lrrbavFV9kLuszwnmRmoJusuIbo5brBsPOF+eKZCUVE=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand Down
10 changes: 8 additions & 2 deletions agent/gemini/pkg/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/bborbe/errors"
libkafka "github.com/bborbe/kafka"
libtime "github.com/bborbe/time"
"github.com/bborbe/vault-cli/pkg/domain"

"github.com/bborbe/agent/agent/gemini/pkg/parser"
"github.com/bborbe/agent/agent/gemini/pkg/steps"
Expand Down Expand Up @@ -90,9 +91,14 @@ func CreateAgent(geminiParser agentlib.AIParser) *agentlib.Agent {
return agentlib.NewAgent(
agentlib.NewPhase(
"planning",
agentlib.NewParseStep[steps.Plan]("parse-plan", geminiParser, "## Plan", "in_progress"),
agentlib.NewParseStep[steps.Plan](
"parse-plan",
geminiParser,
"## Plan",
string(domain.TaskPhaseExecution),
),
),
agentlib.NewPhase("in_progress", steps.NewExecuteStep()),
agentlib.NewPhase(domain.TaskPhaseExecution, steps.NewExecuteStep()),
agentlib.NewPhase("ai_review", steps.NewVerifyStep()),
)
}
Expand Down
Loading