protocol

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LiveSmokePass    = "pass"
	LiveSmokeFail    = "fail"
	LiveSmokeSkipped = "skipped"
	LiveSmokeMissing = "missing"
)

Variables

This section is empty.

Functions

func SaveLiveSmokeSnapshot

func SaveLiveSmokeSnapshot(path string, snapshot ConnectorLiveSmokeSnapshot) error

Types

type CompiledQuestionPlan

type CompiledQuestionPlan struct {
	SchemaVersion            string                     `json:"schemaVersion"`
	Framework                Framework                  `json:"framework"`
	Question                 string                     `json:"question"`
	Components               map[string]string          `json:"components"`
	SourceQueries            map[string]SourceQueryPlan `json:"sourceQueries"`
	InclusionCriteria        []string                   `json:"inclusionCriteria"`
	ExclusionCriteria        []string                   `json:"exclusionCriteria"`
	ExtractionSchema         ExtractionSchemaSeed       `json:"extractionSchema"`
	ReviewerPrompts          []ReviewerPrompt           `json:"reviewerPrompts"`
	ReviewerApprovalRequired bool                       `json:"reviewerApprovalRequired"`
	AutoAcceptedClaims       bool                       `json:"autoAcceptedClaims"`
	Warnings                 []string                   `json:"warnings,omitempty"`
}

func CompileQuestion

func CompileQuestion(input QuestionInput) (CompiledQuestionPlan, error)

func (CompiledQuestionPlan) SortedSourceQueries

func (p CompiledQuestionPlan) SortedSourceQueries() []SourceQueryPlan

type ConnectorCapability

type ConnectorCapability struct {
	ID                        string   `json:"id"`
	Label                     string   `json:"label"`
	Kind                      string   `json:"kind"`
	SupportedEntities         []string `json:"supportedEntities"`
	RateLimitPolicy           string   `json:"rateLimitPolicy"`
	AuthNeeds                 string   `json:"authNeeds"`
	LiveSmokeStatus           string   `json:"liveSmokeStatus"`
	LicenseShareabilityPolicy string   `json:"licenseShareabilityPolicy"`
	Cacheability              string   `json:"cacheability"`
	ProvenanceFields          []string `json:"provenanceFields"`
}

type ConnectorCapabilityRegistry

type ConnectorCapabilityRegistry struct {
	SchemaVersion string                `json:"schemaVersion"`
	Connectors    []ConnectorCapability `json:"connectors"`
}

ConnectorCapabilityRegistry describes source/tool adapter behavior needed for source planning, review gates, package manifests, and dashboard warnings.

func DefaultConnectorCapabilityRegistry

func DefaultConnectorCapabilityRegistry() ConnectorCapabilityRegistry

func (ConnectorCapabilityRegistry) ByID

type ConnectorLiveSmokeAlert

type ConnectorLiveSmokeAlert struct {
	ConnectorID string `json:"connectorId"`
	Label       string `json:"label"`
	Kind        string `json:"kind"`
	Severity    string `json:"severity"`
	Message     string `json:"message"`
}

type ConnectorLiveSmokeResult

type ConnectorLiveSmokeResult struct {
	ConnectorID         string    `json:"connectorId"`
	Label               string    `json:"label,omitempty"`
	Status              string    `json:"status"`
	CheckedAt           time.Time `json:"checkedAt"`
	Message             string    `json:"message,omitempty"`
	EndpointFingerprint string    `json:"endpointFingerprint,omitempty"`
	ObservedFields      []string  `json:"observedFields,omitempty"`
}

type ConnectorLiveSmokeSnapshot

type ConnectorLiveSmokeSnapshot struct {
	SchemaVersion string                     `json:"schemaVersion"`
	CapturedAt    time.Time                  `json:"capturedAt"`
	Results       []ConnectorLiveSmokeResult `json:"results"`
}

func LoadLiveSmokeSnapshot

func LoadLiveSmokeSnapshot(path string) (ConnectorLiveSmokeSnapshot, error)

func NewLiveSmokeSnapshot

func NewLiveSmokeSnapshot(registry ConnectorCapabilityRegistry, capturedAt time.Time) ConnectorLiveSmokeSnapshot

func (ConnectorLiveSmokeSnapshot) MustResult

func (ConnectorLiveSmokeSnapshot) Result

func (*ConnectorLiveSmokeSnapshot) UpsertResult

func (s *ConnectorLiveSmokeSnapshot) UpsertResult(result ConnectorLiveSmokeResult)

type ExtractionField

type ExtractionField struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Required bool   `json:"required"`
}

type ExtractionSchemaSeed

type ExtractionSchemaSeed struct {
	Name   string            `json:"name"`
	Fields []ExtractionField `json:"fields"`
}

type Framework

type Framework string
const (
	FrameworkPICO     Framework = "pico"
	FrameworkPECO     Framework = "peco"
	FrameworkSPIDER   Framework = "spider"
	FrameworkFreeform Framework = "freeform"
)

type QueryExpansionInput

type QueryExpansionInput struct {
	Question    string           `json:"question"`
	SourceTexts []SourceTextLink `json:"sourceTexts"`
}

type QueryExpansionProvenance

type QueryExpansionProvenance struct {
	SuggestionID  string `json:"suggestionId"`
	Term          string `json:"term"`
	BeforeQuery   string `json:"beforeQuery"`
	AfterQuery    string `json:"afterQuery"`
	SourceTextID  string `json:"sourceTextId"`
	ProvenanceTag string `json:"provenanceTag"`
}

type QueryExpansionSuggestion

type QueryExpansionSuggestion struct {
	ID                       string              `json:"id"`
	Assistant                SuggestionAssistant `json:"assistant"`
	SuggestedTerm            string              `json:"suggestedTerm"`
	Rationale                string              `json:"rationale"`
	SourceTextLinks          []SourceTextLink    `json:"sourceTextLinks"`
	Score                    float64             `json:"score"`
	DiversityScore           float64             `json:"diversityScore"`
	ExtractionMethod         string              `json:"extractionMethod"`
	ProvenanceTag            string              `json:"provenanceTag"`
	ReviewerApprovalRequired bool                `json:"reviewerApprovalRequired"`
	ReviewerApproved         bool                `json:"reviewerApproved"`
}

func DraftQueryExpansionSuggestions

func DraftQueryExpansionSuggestions(input QueryExpansionInput) ([]QueryExpansionSuggestion, error)

type QuestionInput

type QuestionInput struct {
	Framework    string
	Question     string
	Population   string
	Intervention string
	Comparator   string
	Outcome      string
	Exposure     string
	Sample       string
	Phenomenon   string
	Design       string
	Evaluation   string
	ResearchType string
}

type ReviewerPrompt

type ReviewerPrompt struct {
	ID            string `json:"id"`
	Text          string `json:"text"`
	ProvenanceTag string `json:"provenanceTag"`
	Accepted      bool   `json:"accepted"`
}

type SourceAPIDriftDashboard

type SourceAPIDriftDashboard struct {
	SchemaVersion string                         `json:"schemaVersion"`
	CapturedAt    time.Time                      `json:"capturedAt"`
	Entries       []SourceAPIDriftDashboardEntry `json:"entries"`
}

func BuildSourceAPIDriftDashboard

func BuildSourceAPIDriftDashboard(registry ConnectorCapabilityRegistry, current ConnectorLiveSmokeSnapshot, previous *ConnectorLiveSmokeSnapshot, now time.Time, provenanceRefs map[string]string) SourceAPIDriftDashboard

func (SourceAPIDriftDashboard) Entry

type SourceAPIDriftDashboardEntry

type SourceAPIDriftDashboardEntry struct {
	ConnectorID         string                    `json:"connectorId"`
	Label               string                    `json:"label"`
	Status              string                    `json:"status"`
	CheckedAt           time.Time                 `json:"checkedAt"`
	EndpointFingerprint string                    `json:"endpointFingerprint,omitempty"`
	ObservedFields      []string                  `json:"observedFields,omitempty"`
	PreviousFields      []string                  `json:"previousFields,omitempty"`
	AddedFields         []string                  `json:"addedFields,omitempty"`
	RemovedFields       []string                  `json:"removedFields,omitempty"`
	Alerts              []ConnectorLiveSmokeAlert `json:"alerts,omitempty"`
	ProvenanceRef       string                    `json:"provenanceRef"`
}

type SourcePlan

type SourcePlan struct {
	SchemaVersion            string                     `json:"schemaVersion"`
	Question                 string                     `json:"question"`
	Framework                Framework                  `json:"framework"`
	Sources                  []SourcePlanEntry          `json:"sources"`
	Warnings                 []string                   `json:"warnings"`
	QueryExpansionProvenance []QueryExpansionProvenance `json:"queryExpansionProvenance,omitempty"`
}

func ApplyApprovedQueryExpansions

func ApplyApprovedQueryExpansions(plan SourcePlan, suggestions []QueryExpansionSuggestion) (SourcePlan, error)

func CompileSourcePlan

func CompileSourcePlan(plan CompiledQuestionPlan) SourcePlan

func CompileSourcePlanFromQuestion

func CompileSourcePlanFromQuestion(input QuestionInput) (SourcePlan, error)

func (SourcePlan) BySource

func (p SourcePlan) BySource(source string) (SourcePlanEntry, bool)

func (SourcePlan) MustSource

func (p SourcePlan) MustSource(source string) SourcePlanEntry

type SourcePlanEntry

type SourcePlanEntry struct {
	Source                    string   `json:"source"`
	Label                     string   `json:"label"`
	SourceKind                string   `json:"sourceKind"`
	SupportedEntities         []string `json:"supportedEntities"`
	Query                     string   `json:"query"`
	DryRunEstimate            string   `json:"dryRunEstimate"`
	RateLimitPolicy           string   `json:"rateLimitPolicy"`
	AuthRequirement           string   `json:"authRequirement"`
	LiveSmokeStatus           string   `json:"liveSmokeStatus"`
	LicenseShareabilityPolicy string   `json:"licenseShareabilityPolicy"`
	Cacheability              string   `json:"cacheability"`
	ProvenanceFields          []string `json:"provenanceFields"`
	PrivacyWarning            string   `json:"privacyWarning"`
	ReviewerApprovalRequired  bool     `json:"reviewerApprovalRequired"`
	CLICommand                string   `json:"cliCommand"`
}

type SourceQueryPlan

type SourceQueryPlan struct {
	Source string `json:"source"`
	Query  string `json:"query"`
	Note   string `json:"note"`
}
type SourceTextLink struct {
	ID         string `json:"id"`
	PaperID    string `json:"paperId,omitempty"`
	PassageRef string `json:"passageRef,omitempty"`
	Text       string `json:"text,omitempty"`
}

type SuggestionAssistant

type SuggestionAssistant string
const (
	AssistantKeyBERT  SuggestionAssistant = "keybert"
	AssistantSciSpaCy SuggestionAssistant = "scispacy"
	AssistantLLM      SuggestionAssistant = "llm"
)

Jump to

Keyboard shortcuts

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