aitesting

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package aitesting provides shared test helpers for code that exercises the ai package's leak-prevention machinery from outside the ai package itself.

The ai package's own tests (internal/ai/prompt_test.go) cannot import this package — that would be an import cycle. They use the same underlying constants directly (ai.PrrSpecificToolNames). Sibling packages (internal/security, internal/audit, future leak-test sites) use the re-exports and helpers here.

Index

Constants

This section is empty.

Variables

View Source
var PrrSpecificToolNames = ai.PrrSpecificToolNames

PrrSpecificToolNames re-exports ai.PrrSpecificToolNames so leak tests in other packages depend on a single import path. The source of truth is ai.PrrSpecificToolNames; do not maintain a separate copy here.

Functions

This section is empty.

Types

type ClaudeCodeProvider

type ClaudeCodeProvider struct{}

ClaudeCodeProvider is a stub ai.Provider that reports RunsOwnToolLoop: true. Useful as the second argument to ai.ResolveTools in leak tests that need to drive the Claude-Code branch without spinning up a real subprocess.

Chat and StreamChat return nil/zero — this is a test double, not a functional provider. Don't use it for anything that actually exercises the chat path.

func (ClaudeCodeProvider) Capabilities

func (ClaudeCodeProvider) Capabilities() ai.Capabilities

func (ClaudeCodeProvider) Chat

func (ClaudeCodeProvider) ModelID

func (ClaudeCodeProvider) ModelID() string

func (ClaudeCodeProvider) Name

func (ClaudeCodeProvider) Name() string

func (ClaudeCodeProvider) StreamChat

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL