Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -178,9 +178,11 @@ func (a *Assessor) Assess(ctx context.Context, websiteURL string, procedure stri
if err != nil {
return nil, fmt.Errorf("cannot parse website URL %q: %w", websiteURL, err)
}
if u.Scheme != "http" && u.Scheme != "https" {
return nil, fmt.Errorf("website URL must use http or https, got %q", u.Scheme)
}
if u.Hostname() == "" {
return nil, fmt.Errorf("website URL %q has no host", websiteURL)
}
@@ -324,6 +326,7 @@ func thirdPartyInfoOutputType() (*agent.OutputType, error) {
if !ok {
return nil, fmt.Errorf("thirdParty info schema has no %q property", field)
}
prop["enum"] = values
}
@@ -331,6 +334,7 @@ func thirdPartyInfoOutputType() (*agent.OutputType, error) {
if err != nil {
return nil, fmt.Errorf("cannot marshal decorated thirdParty info schema: %w", err)
}
outputType.Schema = decorated
return outputType, nil

View File

@@ -60,6 +60,7 @@ func TestThirdPartyInfoOutputType_DecoratesEnums(t *testing.T) {
for i, v := range enumRaw {
actual[i] = v.(string)
}
assert.Equal(t, tt.expected, actual)
})
}

View File

@@ -85,6 +85,7 @@ func newOrchestratorAgent(
if reporter != nil {
opts = append(opts, agent.WithHooks(newSubProgressHooks(reporter, step)))
}
return opts
}
@@ -190,6 +191,7 @@ func newOrchestratorAgent(
out := make([]agent.Tool, 0, len(extra)+len(researchBrowserTools))
out = append(out, extra...)
out = append(out, researchBrowserTools...)
return out
}
@@ -232,12 +234,14 @@ func newOrchestratorAgent(
if err != nil {
return nil, fmt.Errorf("cannot create %s sub-agent: %w", e.toolName, err)
}
tools = append(tools, ag.AsTool(e.toolName, e.description))
}
if procedure == "" {
procedure = defaultProcedure
}
systemPrompt := strings.Replace(orchestratorBasePrompt, "{procedure}", procedure, 1)
opts := []agent.Option{

View File

@@ -73,9 +73,11 @@ func newSubAgent[T any](
if spec.thinkingBudget > 0 {
opts = append(opts, agent.WithThinking(spec.thinkingBudget))
}
if spec.parallelTools {
opts = append(opts, agent.WithParallelToolCalls(true))
}
opts = append(opts, extraOpts...)
return agent.New(spec.name, client, opts...), nil