Skip to content

Commit e0ba3b3

Browse files
mjudeikisclaude
andcommitted
chore(app-studio,infra): fully remove deploy_project_runtime + pull-secret finalizer cleanup
- infra: the application secret-bridge controller now finalizer-guards the registry pull Secret + its default-SA imagePullSecrets entry, cleaning both on instance delete (only instances that create the state carry the finalizer, so dev churn stays independent of the controller). - app-studio: remove the superseded deploy_project_runtime tool entirely — the Eino graph tool, spec, AppDeployment types (from the shared runtime-workflow input/result), and all wiring. Tests that used it as a runtime-tool example now use restart_runtime. Also folds in unrelated in-flight agents-provider working-tree changes per the author's request. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 813b260 commit e0ba3b3

27 files changed

Lines changed: 1251 additions & 371 deletions

providers/agents/api/agents.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222

2323
agentsv1alpha1 "github.com/faroshq/provider-agents/apis/v1alpha1"
24-
agentsclient "github.com/faroshq/provider-agents/client"
2524
"github.com/faroshq/provider-agents/llm"
2625
)
2726

@@ -78,6 +77,9 @@ type createAgentRequest struct {
7877
BudgetTokens int64 `json:"budgetTokens,omitempty"`
7978
// BudgetUSD caps spend per month as a decimal string (empty = unlimited).
8079
BudgetUSD string `json:"budgetUSD,omitempty"`
80+
// NotifyConnection names the messaging Connection background runs deliver
81+
// output/alerts to.
82+
NotifyConnection string `json:"notifyConnection,omitempty"`
8183
}
8284

8385
func (s *Server) createAgent(w http.ResponseWriter, r *http.Request) {
@@ -113,6 +115,7 @@ func (s *Server) createAgent(w http.ResponseWriter, r *http.Request) {
113115
if req.BudgetTokens > 0 || strings.TrimSpace(req.BudgetUSD) != "" {
114116
a.Spec.Budget = &agentsv1alpha1.AgentBudget{Window: "month", TokenLimit: req.BudgetTokens, USDLimit: strings.TrimSpace(req.BudgetUSD)}
115117
}
118+
a.Spec.DefaultNotifyConnection = strings.TrimSpace(req.NotifyConnection)
116119
out, err := c.Agents().Create(r.Context(), a, metav1.CreateOptions{})
117120
if err != nil {
118121
writeResourceError(w, err)
@@ -122,11 +125,12 @@ func (s *Server) createAgent(w http.ResponseWriter, r *http.Request) {
122125
}
123126

124127
type updateAgentRequest struct {
125-
ModelCredential *string `json:"modelCredential,omitempty"`
126-
SystemPrompt *string `json:"systemPrompt,omitempty"`
127-
Autonomy *string `json:"autonomy,omitempty"`
128-
BudgetTokens *int64 `json:"budgetTokens,omitempty"`
129-
BudgetUSD *string `json:"budgetUSD,omitempty"`
128+
ModelCredential *string `json:"modelCredential,omitempty"`
129+
SystemPrompt *string `json:"systemPrompt,omitempty"`
130+
Autonomy *string `json:"autonomy,omitempty"`
131+
BudgetTokens *int64 `json:"budgetTokens,omitempty"`
132+
BudgetUSD *string `json:"budgetUSD,omitempty"`
133+
NotifyConnection *string `json:"notifyConnection,omitempty"`
130134
}
131135

132136
// updateAgent patches mutable agent fields — notably the assigned model
@@ -164,6 +168,9 @@ func (s *Server) updateAgent(w http.ResponseWriter, r *http.Request) {
164168
if req.Autonomy != nil {
165169
agent.Spec.Autonomy = *req.Autonomy
166170
}
171+
if req.NotifyConnection != nil {
172+
agent.Spec.DefaultNotifyConnection = strings.TrimSpace(*req.NotifyConnection)
173+
}
167174
if req.BudgetTokens != nil || req.BudgetUSD != nil {
168175
if agent.Spec.Budget == nil {
169176
agent.Spec.Budget = &agentsv1alpha1.AgentBudget{Window: "month"}
@@ -292,12 +299,12 @@ var errNoCredential = errors.New("this agent has no model credential assigned
292299
// buildChatModelCtx resolves the agent's assigned named model credential and
293300
// builds the Eino model from it. Agents reference a credential by name in
294301
// spec.models["chat"]; the credential is its own Secret (kedge-agents-model-<name>).
295-
func (s *Server) buildChatModelCtx(ctx context.Context, c *agentsclient.Client, agent *agentsv1alpha1.Agent) (einomodel.BaseChatModel, error) {
302+
func (s *Server) buildChatModelCtx(ctx context.Context, creds llm.SecretGetter, agent *agentsv1alpha1.Agent) (einomodel.BaseChatModel, error) {
296303
cred := strings.TrimSpace(agent.Spec.Models["chat"])
297304
if cred == "" {
298305
return nil, errNoCredential
299306
}
300-
profile, err := llm.LoadCredential(ctx, c, cred)
307+
profile, err := llm.LoadCredential(ctx, creds, cred)
301308
if err != nil {
302309
return nil, err
303310
}

0 commit comments

Comments
 (0)