| 1 | import Testing |
| 2 | @testable import Ed |
| 3 | |
| 4 | @Test func readOnlyDefinitionKeepsItsSchema() { |
| 5 | let definition = EdToolDefinition.readOnly( |
| 6 | name: "current_battery", |
| 7 | description: "Read the current battery percentage", |
| 8 | parametersSchema: #"{"type":"object","properties":{}}"# |
| 9 | ) |
| 10 | |
| 11 | #expect(definition.name == "current_battery") |
| 12 | #expect(definition.parametersSchema.contains("properties")) |
| 13 | } |
| 14 | |
| 15 | @Test func configurationHasSafeDefaults() { |
| 16 | let configuration = EdAgentConfiguration() |
| 17 | #expect(configuration.maxToolRounds == 8) |
| 18 | #expect(configuration.maxToolOutputCharacters == 10_000) |
| 19 | } |