app

package
v0.0.0-...-19fc901 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildVersion   = "dev"
	BuildID        = "unknown"
	BuildTimestamp = "unknown"
)

These variables are replaced by release builds with -ldflags. Development builds intentionally report bounded non-secret defaults.

Functions

func NewHTTPHandler

func NewHTTPHandler(deps HTTPDependencies) http.Handler

func NewHTTPServer

func NewHTTPServer(addr string, deps HTTPDependencies) *http.Server

Types

type ActivationDecisionAdminService

type ActivationDecisionAdminService interface {
	ListActivationDecisions(ctx context.Context, scope memory.Scope, limit int) ([]insights.ActivationDecisionRecord, error)
}

type AssuranceAdminService

type AssuranceAdminService interface {
	InspectIngestionFreshness(ctx context.Context, input assurance.IngestionFreshnessInspectionInput) (assurance.IngestionFreshnessReport, error)
	CreateHealthEvaluation(ctx context.Context, input assurance.HealthEvaluationInput) (assurance.HealthEvaluation, error)
	ListHealthEvaluations(ctx context.Context, scope memory.Scope) ([]assurance.HealthEvaluation, error)
	ReadHealthEvaluation(ctx context.Context, input assurance.ReadHealthEvaluationInput) (assurance.HealthEvaluation, error)
	ListIncidents(ctx context.Context, input assurance.ListIncidentsInput) ([]assurance.Incident, error)
	ReadIncident(ctx context.Context, input assurance.ReadIncidentInput) (assurance.Incident, error)
	ApplyIncidentAction(ctx context.Context, input assurance.IncidentActionInput) (assurance.Incident, error)
	ListAlertCandidates(ctx context.Context, scope memory.Scope) ([]assurance.AlertCandidate, error)
	ReadAlertCandidate(ctx context.Context, input assurance.ReadAlertCandidateInput) (assurance.AlertCandidate, error)
	ListAlertDeliveryAttempts(ctx context.Context, input assurance.ListAlertDeliveryAttemptsInput) ([]assurance.AlertDeliveryAttempt, error)
	CreateConformanceProfile(ctx context.Context, profile assurance.ConformanceProfile) (assurance.ConformanceProfile, error)
	ListConformanceProfiles(ctx context.Context, input assurance.ListConformanceProfilesInput) ([]assurance.ConformanceProfile, error)
	ReadConformanceProfile(ctx context.Context, input assurance.ReadConformanceProfileInput) (assurance.ConformanceProfile, error)
	UpdateConformanceProfile(ctx context.Context, input assurance.UpdateConformanceProfileInput) (assurance.ConformanceProfile, error)
	DisableConformanceProfile(ctx context.Context, input assurance.DisableConformanceProfileInput) (assurance.ConformanceProfile, error)
	RunConformance(ctx context.Context, input assurance.ConformanceRunInput) (assurance.ConformanceRun, []assurance.MissingEvidenceDiagnostic, error)
	ListConformanceRuns(ctx context.Context, input assurance.ListConformanceRunsInput) ([]assurance.ConformanceRun, error)
	ReadConformanceRun(ctx context.Context, input assurance.ReadConformanceRunInput) (assurance.ConformanceRun, error)
	CreateReadinessReport(ctx context.Context, input assurance.ReadinessReportInput) (assurance.ReadinessReport, error)
	ListReadinessReports(ctx context.Context, scope memory.Scope) ([]assurance.ReadinessReport, error)
	ReadReadinessReport(ctx context.Context, input assurance.ReadReadinessReportInput) (assurance.ReadinessReport, error)
	CreateRecoveryVerification(ctx context.Context, input assurance.RecoveryVerificationInput) (assurance.RecoveryVerification, error)
	ListRecoveryVerifications(ctx context.Context, scope memory.Scope) ([]assurance.RecoveryVerification, error)
	ReadRecoveryVerification(ctx context.Context, input assurance.ReadRecoveryVerificationInput) (assurance.RecoveryVerification, error)
}

type CompactionEvidenceReader

type CompactionEvidenceReader interface {
	ReadCompactionEvidence(context.Context, memory.Scope, string) (memory.CompactionEvidence, error)
}

type ContextProjectionAdminService

type ContextProjectionAdminService interface {
	RebuildContextProjection(context.Context, memory.ContextProjectionRebuildRequest) (memory.ContextProjection, error)
}

type DerivedInsightAdminService

type DerivedInsightAdminService interface {
	ListDerivedInsights(ctx context.Context, input memory.ListDerivedInsightsInput) ([]memory.DerivedInsight, error)
	ReadDerivedInsight(ctx context.Context, input memory.ReadDerivedInsightInput) (memory.DerivedInsightDetail, error)
	TransitionDerivedInsightLifecycle(ctx context.Context, transition memory.DerivedInsightLifecycleTransition) error
	CreateDerivedInsightFeedback(ctx context.Context, input memory.CreateDerivedInsightFeedbackInput) (memory.DerivedInsightFeedback, error)
	ListDerivedInsightFeedback(ctx context.Context, input memory.ListDerivedInsightFeedbackInput) ([]memory.DerivedInsightFeedback, error)
	SupersedeDerivedInsightFeedback(ctx context.Context, input memory.SupersedeDerivedInsightFeedbackInput) error
}

type DerivedInsightReplayAdminService

type DerivedInsightReplayAdminService interface {
	PlanDerivedInsightReplay(ctx context.Context, input memory.DerivedInsightReplayRequest) (memory.DerivedInsightReplayReport, error)
	ApplyDerivedInsightReplay(ctx context.Context, input memory.DerivedInsightReplayRequest) (memory.DerivedInsightReplayRun, error)
	ListDerivedInsightReplayRuns(ctx context.Context, input memory.ListDerivedInsightReplayRunsInput) ([]memory.DerivedInsightReplayRun, error)
	ReadDerivedInsightReplayRun(ctx context.Context, input memory.ReadDerivedInsightReplayRunInput) (memory.DerivedInsightReplayRun, error)
	ReadDerivedInsightReplayReport(ctx context.Context, input memory.ReadDerivedInsightReplayRunInput) (memory.DerivedInsightReplayReport, error)
}

type DerivedQueueReader

type DerivedQueueReader interface {
	ReadDerivedWorkStatus(context.Context, memory.Scope, time.Time) (workqueue.Status, error)
	ListDerivedWork(context.Context, workqueue.ListInput) (workqueue.WorkPage, error)
}

DerivedQueueReader is the authorized, exact-scope inspection boundary for unified derived work. Implementations must enforce scope predicates before returning status or detail.

type GovernanceStatus

type GovernanceStatus = jobs.GovernanceStatus

type GovernanceStatusReader

type GovernanceStatusReader interface {
	ReadGovernanceStatus(ctx context.Context) (GovernanceStatus, error)
}

type HTTPDependencies

type HTTPDependencies struct {
	HTTP                        HTTPRuntimeLimits
	MCP                         config.MCPConfig
	MCPAdapter                  http.Handler
	Contract                    RuntimeContract
	Readiness                   ReadinessChecker
	APIKeys                     auth.StaticAPIKeys
	AdminAPIKeys                auth.StaticAPIKeys
	PrincipalAuthorizer         auth.PrincipalAuthorizer
	PrincipalAdmin              PrincipalAdministrationService
	EventIngestor               memory.EventIngestor
	MemoryIntent                MemoryIntentAPI
	MemoryIntentPolicy          memory.MemoryIntentPolicyGate
	MemoryIntentRead            MemoryIntentReader
	ProceduralVerificationAdmin ProceduralVerificationAdminAPI
	// ProceduralVerificationPolicyVersion is server configuration, never a
	// caller-selected assertion policy.
	ProceduralVerificationPolicyVersion string
	MemoryRepository                    MemoryRepositoryAPI
	ReflectionReviewAdmin               ReflectionReviewAPI
	ReflectionRunRead                   ReflectionRunReader
	CompactionEvidenceRead              CompactionEvidenceReader
	MemoryQuery                         MemoryQueryService
	MemoryLifecycleAction               MemoryLifecycleActionService
	MemoryManualMutation                ManualMemoryMutationService
	EmbeddingAdminRead                  EmbeddingAdminQueryService
	MemorySearcher                      retrieval.MemorySearcher
	ContextAssembler                    retrieval.ContextAssembler
	GovernanceStatusRead                GovernanceStatusReader
	GovernanceAdmin                     GovernanceAdminService
	DerivedInsightAdmin                 DerivedInsightAdminService
	GoalVisibilityAdmin                 insights.GoalReviewReader
	DerivedInsightReplayAdmin           DerivedInsightReplayAdminService
	ActivationDecisionAdmin             ActivationDecisionAdminService
	RetrievalIntegrityAdmin             RetrievalIntegrityAdminService
	QualityAdmin                        QualityAdminService
	ScopeProofAdmin                     ScopeProofAdminService
	MemorySession                       MemorySessionService
	UsefulnessFeedback                  UsefulnessFeedbackService
	TaskEvaluations                     TaskEvaluationService
	RankingRollout                      RankingRolloutAdminService
	ReleaseEvidenceReconcile            ReleaseEvidenceReconciliationAdminService
	AssuranceAdmin                      AssuranceAdminService
	ContextProjectionAdmin              ContextProjectionAdminService
	Workflow                            WorkflowService
	MemoryHistoryRead                   MemoryHistoryReader
	JobExecutionRead                    JobExecutionReader
	SchedulerRunHistoryRead             jobs.SchedulerRunHistoryReader
	SchedulerRunActions                 jobs.SchedulerRunAdminActions
	DerivedQueueRead                    DerivedQueueReader
	Metrics                             MetricsRecorder
	Logger                              *log.Logger
	ProviderEnabled                     bool
	ProviderCapabilities                provider.CapabilityDocument
	ProviderInitializer                 *provider.RuntimeInitializer
	ProviderBindings                    provider.RuntimeBindingStore
	ProviderAdapter                     *provider.Adapter
	ProviderReferences                  provider.ReferenceStore
	ProviderReadObserver                ProviderReadObserver
	ProviderProjections                 provider.ProjectionStore
	ProviderCorrections                 provider.CorrectionResolver
	ProviderSynchronizer                *provider.Synchronizer
	ProviderSchemaVersions              []string
	ProviderContextReceipts             provider.ContextReceiptStore
	ProviderContextTurns                provider.ContextTurnAuthorizer
	ProviderContextAttributions         provider.ContextTurnAttributionStore
	ProviderContextContinuity           provider.ContextContinuityConfig
	ProviderContextPolicy               func(context.Context, provider.RuntimeBinding) ([]byte, error)
	ProviderLimits                      provider.ProviderLimits
	ReasoningCapabilities               reasoning.Capability
}

type HTTPRuntimeLimits

type HTTPRuntimeLimits struct {
	MaxRequestBodyBytes int64
	MaxHeaderBytes      int
	ReadHeaderTimeout   time.Duration
	ReadTimeout         time.Duration
	WriteTimeout        time.Duration
	IdleTimeout         time.Duration
}

type JobExecutionReader

type JobExecutionReader interface {
	ListRecentJobExecutions(ctx context.Context, scope memory.Scope, limit int) ([]jobs.JobExecutionRecord, error)
}

type MemoryHistoryReader

type MemoryHistoryReader interface {
	ReadMemoryHistory(ctx context.Context, scope memory.Scope, memoryID string) (memory.MemoryHistory, error)
}

type MemoryIntentAPI

type MemoryIntentAPI interface {
	Submit(context.Context, memory.MemoryIntentInput) (memory.MemoryIntentRecord, error)
}

type MemoryIntentHistoryReader

type MemoryIntentHistoryReader interface {
	ReadMemoryIntentHistory(context.Context, memory.Scope, string) (memory.MemoryIntentHistory, error)
}

type MemoryIntentReader

type MemoryIntentReader interface {
	ReadMemoryIntent(context.Context, memory.Scope, string) (memory.MemoryIntentRecord, error)
}

type MemoryLifecycleActionService

type MemoryLifecycleActionService interface {
	Apply(ctx context.Context, input memory.LifecycleActionInput) error
}

type MemoryProvenanceViewReader

type MemoryProvenanceViewReader interface {
	GetMemoryProvenanceView(ctx context.Context, scope memory.Scope, memoryID string) (memory.ProvenanceView, error)
}

MemoryProvenanceViewReader is an optional extension of MemoryQueryService. When the configured reader implements it, the provenance response additionally carries the bounded temporal summary. It is kept separate so a reader that has not been updated keeps serving the original response shape.

type MemoryQueryService

type MemoryQueryService interface {
	ListMemories(ctx context.Context, input memory.ListMemoriesInput) (memory.MemoryPage, error)
	GetMemory(ctx context.Context, scope memory.Scope, memoryID string) (memory.MemoryResource, error)
	GetMemoryHistory(ctx context.Context, scope memory.Scope, memoryID string) (memory.MemoryHistory, error)
	GetMemoryProvenance(ctx context.Context, scope memory.Scope, memoryID string) ([]memory.ProvenanceRecord, error)
}

type MetricsRecorder

type MetricsRecorder interface {
	RenderPrometheus() string
	RecordAdmission(ctx context.Context, event telemetry.AdmissionEvent)
	RecordCutoverPlanState(ctx context.Context, event telemetry.CutoverPlanStateEvent)
	RecordCutoverItemState(ctx context.Context, event telemetry.CutoverItemStateEvent)
	RecordInsightFeedback(ctx context.Context, event telemetry.InsightFeedbackEvent)
	RecordUsefulnessFeedback(ctx context.Context, event telemetry.UsefulnessFeedbackEvent)
	RecordTaskEvaluation(ctx context.Context, event telemetry.TaskEvaluationEvent)
	RecordRankingRollout(ctx context.Context, event telemetry.RankingRolloutEvent)
}

type PrincipalAdministrationService

type PrincipalAdministrationService interface {
	CreatePrincipal(ctx context.Context, input auth.CreatePrincipalInput) (auth.IssuedPrincipal, error)
	ListPrincipals(ctx context.Context, scope memory.Scope, limit int) ([]auth.Principal, error)
	ReadPrincipal(ctx context.Context, scope memory.Scope, principalID string) (auth.Principal, error)
	ListScopeGrants(ctx context.Context, scope memory.Scope, principalID string) ([]auth.ScopeGrant, error)
	RotateCredential(ctx context.Context, scope memory.Scope, principalID, actor, reason string) (auth.IssuedCredential, error)
	DisablePrincipal(ctx context.Context, scope memory.Scope, principalID, actor, reason string) error
	ExpirePrincipal(ctx context.Context, scope memory.Scope, principalID string, expiresAt time.Time, actor, reason string) error
	CreateScopeGrant(ctx context.Context, scope memory.Scope, principalID string, grantScope memory.Scope, accessMode auth.ScopeGrantAccessMode, actor, reason string) error
	RevokeScopeGrant(ctx context.Context, scope memory.Scope, grantID, actor, reason string) error
	ListAccessAudit(ctx context.Context, scope memory.Scope, principalID string, limit int) ([]auth.AuditRecord, error)
}

type ProceduralVerificationAdminAPI

ProceduralVerificationAdminAPI is deliberately separate from ordinary memory query and Provider contracts. Implementations must enforce exact scope and lifecycle eligibility before returning any verification data.

type ProviderReadObserver

type ProviderReadObserver interface {
	RecordProviderMemoryRead(context.Context, memory.Scope, []string, time.Time) error
}

type RankingRolloutAdminService

type RankingRolloutAdminService interface {
	CreateRankingRolloutPolicy(ctx context.Context, policy memory.RankingRolloutPolicy) (memory.RankingRolloutPolicy, error)
	ReadRankingRolloutPolicy(ctx context.Context, input memory.ReadRankingRolloutPolicyInput) (memory.RankingRolloutPolicy, error)
	ListRankingRolloutPolicies(ctx context.Context, input memory.ListRankingRolloutPoliciesInput) ([]memory.RankingRolloutPolicy, error)
	RecordRankingRolloutDryRun(ctx context.Context, input memory.RecordRankingRolloutDryRunInput) (memory.RankingRolloutDryRun, error)
	ActivateRankingRolloutPolicy(ctx context.Context, input memory.ActivateRankingRolloutPolicyInput) (memory.RankingRolloutPolicy, error)
	DisableRankingRolloutPolicy(ctx context.Context, input memory.DisableRankingRolloutPolicyInput) (memory.RankingRolloutPolicy, error)
	RollbackRankingRolloutPolicy(ctx context.Context, input memory.RollbackRankingRolloutPolicyInput) (memory.RankingRolloutPolicy, error)
	ListRankingRolloutPolicyImpact(ctx context.Context, input memory.ListRankingRolloutPolicyImpactInput) ([]memory.RankingRolloutImpactEntry, error)
}

type RankingRolloutReconciliationEligibilityReader

type RankingRolloutReconciliationEligibilityReader interface {
	ReadReleaseEvidenceReconciliationEligibility(context.Context, memory.Scope, string) (bool, error)
}

type ReadinessChecker

type ReadinessChecker interface {
	Ready(ctx context.Context) error
}

type ReflectionReviewAPI

type ReflectionReviewAPI interface {
	Decide(context.Context, memory.ReflectionReviewInput) (memory.ReflectionReviewRecord, error)
}

type ReflectionRunReader

type ReflectionRunReader interface {
	ReadReflectionRun(context.Context, memory.Scope, string) (memory.ReflectionRun, error)
}

type ReleaseEvidenceReconciliationAdminService

type ReleaseEvidenceReconciliationAdminService interface {
	ListReleaseEvidenceReconciliation(context.Context, memory.Scope, int) ([]retrieval.ReconciliationInspection, error)
	TriggerReleaseEvidenceReconciliation(context.Context, memory.Scope, retrieval.ReconciliationTrigger) (string, error)
}

type RetrievalIntegrityAdminService

type RetrievalIntegrityAdminService interface {
	ListRetrievalIntegrityReports(ctx context.Context, scope memory.Scope, limit int) ([]evaluation.RedactedIntegrityReport, error)
}

type Runner

type Runner interface {
	Start(ctx context.Context) error
}

func NewRunner

func NewRunner(cfg config.Config) (Runner, error)

type RuntimeContract

type RuntimeContract struct {
	ServiceVersion string
	BuildID        string
	BuildTimestamp string
	SchemaVersion  int64
}

func (*RuntimeContract) Normalize

func (c *RuntimeContract) Normalize()

type TaskEvaluationService

type TaskEvaluationService interface {
	CreateTaskEvaluation(ctx context.Context, input memory.TaskEvaluation) (memory.TaskEvaluation, error)
	ReadTaskEvaluation(ctx context.Context, input memory.ReadTaskEvaluationInput) (memory.TaskEvaluation, error)
	ListTaskEvaluations(ctx context.Context, input memory.ListTaskEvaluationsInput) ([]memory.TaskEvaluation, error)
	SupersedeTaskEvaluation(ctx context.Context, input memory.SupersedeTaskEvaluationInput) error
	SummarizeTaskEvaluations(ctx context.Context, input memory.SummarizeTaskEvaluationsInput) (memory.TaskEvaluationSummary, error)
}

type UsefulnessFeedbackService

type UsefulnessFeedbackService interface {
	CreateUsefulnessFeedback(ctx context.Context, input memory.UsefulnessFeedback) (memory.UsefulnessFeedback, error)
	ListUsefulnessFeedback(ctx context.Context, input memory.ListUsefulnessFeedbackInput) ([]memory.UsefulnessFeedback, error)
	ReadUsefulnessFeedback(ctx context.Context, input memory.ReadUsefulnessFeedbackInput) (memory.UsefulnessFeedback, error)
	SummarizeUsefulnessFeedback(ctx context.Context, input memory.SummarizeUsefulnessFeedbackInput) (memory.UsefulnessFeedbackSummary, error)
	SupersedeUsefulnessFeedback(ctx context.Context, input memory.SupersedeUsefulnessFeedbackInput) error
}

Jump to

Keyboard shortcuts

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