refactor(tools): remove artificial analysis ceilings

This commit is contained in:
morluto
2026-09-29 16:29:23 +08:00
parent 36aeec9586
commit 2f08c7c932
202 changed files with 2314 additions and 3072 deletions
+3 -4
View File
@@ -113,9 +113,9 @@ describe("tool contract surface", () => {
expect(typeof contract.annotations.openWorldHint).toBe("boolean");
expect(typeof contract.annotations.readOnlyHint).toBe("boolean");
expect(typeof contract.annotations.destructiveHint).toBe("boolean");
expect(contract.examples).toHaveLength(1);
expect(contract.examples.length).toBeGreaterThan(0);
for (const example of contract.examples) {
expect(example.title.length).toBeGreaterThan(10);
expect(example.title.trim().length).toBeGreaterThan(0);
expect(
contract.inputSchema.safeParse(example.input).success,
`${contract.name}: ${example.title}`,
@@ -193,8 +193,7 @@ describe("tool contract surface", () => {
]) {
const schema = contractJsonSchema(contract.outputSchema);
expect(JSON.stringify(schema)).not.toContain('"result":{}');
expect(contract.description.length).toBeGreaterThan(100);
expect(contract.description).toMatch(/[.;]/u);
expect(contract.description.trim().length).toBeGreaterThan(0);
}
});
});