detectiveui

package
v0.141.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package detectiveui provides native keyboard-driven Checks and Detective workspaces. All project state and execution are delegated to the current DataTug agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIGenerate

type AIGenerate struct {
	Text           string
	CaseID         string
	ExpectedCounts map[string]int
}

type AIPage

type AIPage struct {
	Proposals  []ai.Proposal `json:"proposals"`
	NextCursor string        `json:"nextCursor,omitempty"`
	HasMore    bool          `json:"hasMore"`
}

type AIReview

type AIReview struct {
	Type    string
	Draft   *ai.ReviewedDraftRequest
	Context *ai.ContextReviewRequest
}

type AIService

type AIService interface {
	AIProposals(context.Context, string) (AIPage, error)
	GenerateAI(context.Context, AIGenerate) (ai.Response, error)
	ReviewAI(context.Context, AIReview) (ai.Proposal, error)
	ConfirmAI(context.Context, ai.ConfirmRequest) (ai.Receipt, error)
}

type CaseEventsService

type CaseEventsService interface {
	CaseEvents(context.Context, string, int) (detective.CaseEventsPage, error)
}

HostedService adds server-authorized evidence and cross-store workflows to the shared Checks/Case service. Agent-only sessions expose these explicitly as unavailable until their corresponding agent routes exist.

type IncidentAction

type IncidentAction struct {
	Type, CaseID, IncidentRef, Environment, Title, Description string
	IfMatch                                                    int64
	Case                                                       *detective.Case
}
type IncidentLinks struct {
	CaseID    string                   `json:"caseId"`
	Incidents []incidents.IncidentView `json:"incidents"`
}

type IncidentResponse

type IncidentResponse struct {
	Incident          incidents.IncidentView `json:"incident"`
	Case              *detective.Case        `json:"case,omitempty"`
	Receipt           string                 `json:"receipt"`
	CaseLinkStatus    string                 `json:"caseLinkStatus,omitempty"`
	LinkPendingReason string                 `json:"linkPendingReason,omitempty"`
}

type IncidentService

type IncidentService interface {
	LinkedIncidents(context.Context, string) (IncidentLinks, error)
	IncidentAction(context.Context, IncidentAction) (IncidentResponse, error)
}

type KnowledgeAction

type KnowledgeAction struct {
	Type, ProposalID, ReviewNote string
	IfMatch                      int64
	Proposal                     *KnowledgeProposal
	Target                       *KnowledgeTarget
}

type KnowledgeHandoff

type KnowledgeHandoff struct {
	Kind            string          `json:"kind"`
	Status          string          `json:"status"`
	Target          KnowledgeTarget `json:"target"`
	ProposalID      string          `json:"proposalId"`
	ProposalVersion int64           `json:"proposalVersion"`
	CaseID          string          `json:"caseId"`
	ClaimStatus     string          `json:"claimStatus"`
	Statement       string          `json:"statement"`
	EvidenceRefs    []string        `json:"evidenceRefs"`
	FindingRefs     []string        `json:"findingRefs,omitempty"`
	PreparedAt      time.Time       `json:"preparedAt"`
	PreparedBy      string          `json:"preparedBy"`
	Receipt         string          `json:"receipt"`
}

type KnowledgePage

type KnowledgePage struct {
	Proposals  []KnowledgeProposal `json:"proposals"`
	NextCursor string              `json:"nextCursor,omitempty"`
	HasMore    bool                `json:"hasMore"`
}

type KnowledgeProposal

type KnowledgeProposal struct {
	ID           string             `json:"id"`
	CaseID       string             `json:"caseId"`
	Kind         string             `json:"kind"`
	Title        string             `json:"title"`
	Statement    string             `json:"statement"`
	EvidenceRefs []string           `json:"evidenceRefs"`
	FindingRefs  []string           `json:"findingRefs,omitempty"`
	ClaimStatus  string             `json:"claimStatus"`
	Status       string             `json:"status"`
	Version      int64              `json:"version"`
	CreatedAt    time.Time          `json:"createdAt"`
	CreatedBy    string             `json:"createdBy"`
	ReviewedAt   time.Time          `json:"reviewedAt,omitempty"`
	ReviewedBy   string             `json:"reviewedBy,omitempty"`
	ReviewNote   string             `json:"reviewNote,omitempty"`
	Handoffs     []KnowledgeHandoff `json:"handoffs,omitempty"`
}

type KnowledgeResponse

type KnowledgeResponse struct {
	Proposal *KnowledgeProposal `json:"proposal,omitempty"`
	Export   *KnowledgeHandoff  `json:"export,omitempty"`
	Receipt  string             `json:"receipt"`
}

type KnowledgeService

type KnowledgeService interface {
	KnowledgeProposals(context.Context, string) (KnowledgePage, error)
	KnowledgeAction(context.Context, KnowledgeAction) (KnowledgeResponse, error)
}

type KnowledgeTarget

type KnowledgeTarget struct {
	System           string `json:"system"`
	Repository       string `json:"repository"`
	ResourceID       string `json:"resourceId"`
	ExpectedRevision string `json:"expectedRevision"`
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New(service Service, start string) *Model

func (*Model) AtCatalog

func (m *Model) AtCatalog() bool

func (*Model) CanLeave

func (m *Model) CanLeave() bool

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() tea.View

type QueryExecutionService

type QueryExecutionService interface {
	RunSavedQuery(context.Context, SavedQueryRun) (SavedQueryResult, error)
}

type SavedQueryResult

type SavedQueryResult struct {
	Result            apicontract.Result `json:"result"`
	QueryRevision     string             `json:"queryRevision"`
	ResultFingerprint string             `json:"resultFingerprint"`
	Receipt           string             `json:"receipt"`
}

type SavedQueryRun

type SavedQueryRun struct {
	QueryID, Environment string
	Inputs               map[string]apicontract.TypedValueOrSet
}

Jump to

Keyboard shortcuts

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