Documentation
¶
Index ¶
Constants ¶
View Source
const ( ScenarioPrefix = "PARITY_SCENARIO:" DefaultModel = "claude-sonnet-4-6" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturedRequest ¶
type CapturedRequest struct {
Method string `json:"method"`
Path string `json:"path"`
Headers map[string]string `json:"headers"`
Scenario string `json:"scenario"`
Stream bool `json:"stream"`
RawBody string `json:"raw_body"`
}
CapturedRequest records a single request made to the mock service.
type MockAnthropicService ¶
type MockAnthropicService struct {
// contains filtered or unexported fields
}
MockAnthropicService simulates an Anthropic API server for integration tests.
func SpawnMockService ¶
func SpawnMockService() *MockAnthropicService
SpawnMockService creates and starts a new mock Anthropic service.
func (*MockAnthropicService) BaseURL ¶
func (s *MockAnthropicService) BaseURL() string
BaseURL returns the URL of the mock server.
func (*MockAnthropicService) CapturedRequests ¶
func (s *MockAnthropicService) CapturedRequests() []CapturedRequest
CapturedRequests returns a copy of all captured requests.
func (*MockAnthropicService) Close ¶
func (s *MockAnthropicService) Close()
Close shuts down the mock server.
type Scenario ¶
type Scenario int
Scenario identifies a mock response pattern.
const ( ScenarioStreamingText Scenario = iota ScenarioReadFileRoundtrip ScenarioGrepChunkAssembly ScenarioWriteFileAllowed ScenarioWriteFileDenied ScenarioMultiToolTurnRoundtrip ScenarioBashStdoutRoundtrip ScenarioBashPermissionPromptApproved ScenarioBashPermissionPromptDenied ScenarioPluginToolRoundtrip ScenarioAutoCompactTriggered ScenarioTokenCostReporting ScenarioRateLimited429 ScenarioAuthFailure401 ScenarioAuthForbidden403 ScenarioContextWindowExceeded ScenarioChunkedSSE )
func ParseScenario ¶
ParseScenario converts a string to a Scenario, returning ok=false if unknown.
Click to show internal directories.
Click to hide internal directories.