Major additions: - Community Next.js app (port 18187) for browsing claims with API docs - stemedb-chaos crate: Fault injection, chaos testing, CRDT properties - Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents - Disputed claims handling: Manual review workflows and validation - Aphoria security scanner: New extractors (SQL injection, command injection, weak crypto, TLS version), policy-based ignores, UAT reports - Docker infrastructure: Dockerfile, docker-compose.yml for full stack - VulnBank demo: Intentionally vulnerable multi-language test corpus SDK & API enhancements: - Source registry handlers for tracking data provenance - Metrics endpoint - Skeptic filtering improvements Code quality: - Split 14 large files (>500 lines) into focused modules - All files now under 500-line limit per project guidelines Documentation: - Chaos testing guide, circuit breakers, observability docs - Phase 7 UAT documentation updates - Martin Kleppmann technical writer agent Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
63 lines
1.9 KiB
Go
63 lines
1.9 KiB
Go
// Package adk provides ADK-Go tool wrappers for StemeDB.
|
|
//
|
|
// This package wraps the base StemeDB SDK with tool definitions suitable
|
|
// for Google's Agent Development Kit (ADK-Go). It provides:
|
|
//
|
|
// - QueryTool - Query with lens-based resolution
|
|
// - AssertTool - Create assertions with confidence
|
|
// - ConstraintCheckTool - Pre-flight validation
|
|
// - TraceTool - Audit trail queries
|
|
// - SupersedeTool - Epoch/correction management
|
|
//
|
|
// Since ADK-Go is not yet publicly released, these tools use interface-based
|
|
// design and can be adapted to any ADK implementation.
|
|
//
|
|
// Example usage:
|
|
//
|
|
// client := steme.NewClient("http://localhost:18180", signer)
|
|
// tools := adk.AllTools(client)
|
|
//
|
|
// // Use tools with your ADK agent configuration
|
|
// agent := configureAgent(tools)
|
|
package adk
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/orchard9/stemedb-go/steme"
|
|
)
|
|
|
|
// Tool represents a generic ADK tool interface.
|
|
//
|
|
// This interface is designed to be compatible with any ADK implementation.
|
|
type Tool interface {
|
|
Name() string
|
|
Description() string
|
|
Execute(ctx context.Context, input []byte) ([]byte, error)
|
|
}
|
|
|
|
// EpistemeClient defines the interface for StemeDB operations.
|
|
//
|
|
// This interface allows for easy mocking and testing.
|
|
type EpistemeClient interface {
|
|
Query(ctx context.Context, params steme.QueryParams) (*steme.QueryResult, error)
|
|
Assert(ctx context.Context, assertion steme.Assertion) (string, error)
|
|
Trace(ctx context.Context, params steme.TraceParams) (*steme.TraceResult, error)
|
|
Supersede(ctx context.Context, params steme.SupersedeParams) (*steme.SupersedeResult, error)
|
|
}
|
|
|
|
// AllTools returns all available Episteme tools.
|
|
//
|
|
// Use this for agent configuration:
|
|
//
|
|
// tools := adk.AllTools(client)
|
|
func AllTools(client EpistemeClient) []Tool {
|
|
return []Tool{
|
|
NewQueryTool(client),
|
|
NewAssertTool(client),
|
|
NewConstraintCheckTool(client),
|
|
NewTraceTool(client),
|
|
NewSupersedeTool(client),
|
|
}
|
|
}
|