Skip to content

MED: as-any on all HERALD tool parameter schemas bypasses type checking #113

@rz1989s

Description

@rz1989s

Description

Every HERALD tool definition in `packages/agent/src/herald/tools/*.ts` uses `} as any` on the parameters object:

```typescript
parameters: {
type: 'object',
properties: { ... },
required: [...],
} as any,
```

This suppresses type checking between the JSON Schema parameter definitions and the executor function signatures. If a parameter is renamed in the executor but not in the schema, TypeScript won't catch it.

Fix

Define a `ToolParameters` type or use the pi-ai library's built-in type, remove `as any`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt to address post-hackathon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions