feat(webhooks): outbound webhook delivery#32
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
📝 WalkthroughWalkthroughAdds a new Changes
sequenceDiagram
participant Client
participant API
participant Validation as ModelValidation
participant Jobs
participant Daemon
participant Runtime
Client->>API: POST /agents/run (agentId, tier, model?)
API->>Validation: validateModelAccess(tier, model)
alt denied
Validation-->>API: 403 reason
API-->>Client: 403
else allowed
Validation-->>API: allowed
API->>Validation: resolveModel(tier, model)
Validation-->>API: resolvedModel
API->>API: systemPrompt = agent.config or default
API->>Jobs: dispatchAgentRun(runId, model, systemPrompt, timeoutSecs, ...)
Jobs-->>API: jobAccepted
API-->>Client: {runId, status}
Jobs->>Daemon: agent.execute job (model, system_prompt, plan_tier, timeout_secs, ...)
Daemon->>Runtime: POST /run (model, system_prompt, plan_tier, max_tokens, timeout_secs, input_payload)
alt model starts with "ollama/"
Runtime->>Runtime: route to OllamaRunner (multiplier: 0)
else cloud model
Runtime->>Runtime: lazy-import Anthropic client (multiplier: 1|3|15)
end
Runtime-->>Daemon: RunResponse (output_payload, raw_tokens, billed_tokens)
Daemon->>Daemon: persist output_payload (RunOutput.output_payload)
Daemon-->>Jobs: mark complete
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
📝 Coding Plan
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
Summary by CodeRabbit
New Features
Chores