Documentation
¶
Overview ¶
Package goncho provides high-trust local memory for Go-native AI agent runtimes.
Goncho is an embedded memory kernel, not a hosted memory service. It stores local evidence, derives scoped recall, assembles context, records review signals, and helps callers verify remembered claims before an agent acts on them. The core operating rule is evidence before belief and verification before action: memory can orient an agent, but current evidence decides whether an action is safe.
Use Goncho when an agent host needs durable local state, auditable recall, scoped peer/session memory, review queues, stale-claim warnings, and deterministic benchmark evidence without a Python service, Docker sidecar, hosted vector database, or always-online memory API.
Install the library with:
go get github.com/TrebuchetDynamics/goncho/service@latest
The service package is a library package, not a root go install target. To install the reproducible retrieval benchmark CLI, use:
go install github.com/TrebuchetDynamics/goncho/cmd/goncho-bench@latest
Import path guide:
- github.com/TrebuchetDynamics/goncho/service is the service library package for RunMigrations, NewService, service params, and public tool constructors.
- github.com/TrebuchetDynamics/goncho/memory is the SQLite opener for memory.OpenSqlite when an embedded host wants a local file-backed store.
- github.com/TrebuchetDynamics/goncho/cmd/goncho-bench is command-only; do not import cmd/goncho-bench into an agent host.
When in doubt, stay on public service and tool APIs before reaching for lower-level storage or benchmark internals.
Trust boundary for host agents:
Goncho can orient the agent by storing evidence, ranking scoped memory, assembling context packs, and warning when remembered claims may be stale. The host remains authoritative for decisions that require current state or external authority.
- Authorization and policy decisions still belong to the host runtime, gateway, or operator.
- Live filesystem, API, deployment, and credential state must be checked at action time.
- Money movement, destructive writes, and external side effects require explicit host-side gates.
- Treat retrieved memory as evidence to check, not as permission to skip live verification.
Quick start:
store, err := memory.OpenSqlite("goncho.db", 0, nil)
if err != nil {
return err
}
defer store.Close(ctx)
if err := goncho.RunMigrations(store.DB()); err != nil {
return err
}
svc := goncho.NewService(store.DB(), goncho.Config{
WorkspaceID: "local-agent",
ObserverPeerID: "agent",
}, nil)
Host integration checklist:
- Open local SQLite with memory.OpenSqlite and close the store during host shutdown.
- RunMigrations before NewService on every boot so the database matches the service schema.
- Set WorkspaceID and ObserverPeerID so memory, reviews, and audits are attributable.
- Pass ProfileID, Peer, and SessionKey explicitly when the host has profile or session routing.
- Call Service.Context before tool execution to build orientation, then let the host verify live state.
- Store evidence-backed conclusions after observations, user-visible decisions, or verified tool results.
- Verify live state before acting: paths, APIs, credentials, deployments, and services still need current proof.
Primary API path:
- Service.Conclude records evidence-backed conclusions.
- Service.Search retrieves scoped memory candidates.
- Service.Recall returns a scored RecallTrace with provenance, warnings, and selection/rejection reasoning before projection.
- Service.Context assembles an orientation pack for the next action.
- Service.Profile stores and reads durable profile facts.
- Service.ExtractMemoryProposals inspects a bounded session window and returns add/update/supersede/delete/noop proposals with message evidence; review-required proposals are queued without writing active memory.
- Service.ProviderHealthDiagnostics reports optional extraction, embedding, reranking, and summarization provider state. Semantic provider failures degrade recall with warnings while lexical/local evidence remains usable.
- Service.PreviewRetention and Service.ApplyRetention provide non-destructive retention planning and audited archive/tombstone application; archived conclusions keep stable IDs but are excluded from active recall.
- Service.ExportPortableJSONL, Service.PreviewPortableImport, Service.ImportPortableJSONL, and Service.ExportPortableMarkdown provide portable local mirrors with checksummed manifests and preview-first import.
- Service.RecordEvalFailures and Service.RecordRecallFeedback turn benchmark misses and runtime labels into reviewable improvement evidence without promoting claims; EvaluateRegressionGate enforces deterministic tolerances.
- Service.AcquireActionLease, Service.RenewActionLease, Service.ExpireActionLeases, and Service.ListActionLeaseAudit provide local server-mode coordination primitives with TTLs, owner checks, and audit-visible allow/deny/expire evidence.
- Service.RecordActionSignalReceipt, Service.ListActionSignalReceipts, and Service.ListActionSignalReceiptAudit add read receipts to action signals with observable workspace/profile authorization decisions.
- Service.TeamFeed and Service.ListTeamFeedAudit expose a read-only, paginated team feed over authorized action signals with observable ACL allow/deny evidence.
- Service.PreviewFilesystemWatcherImport and Service.ImportFilesystemWatcherChanges let local watcher connectors import changed project docs/code as scoped observations only after explicit include/exclude rules select the files.
- ServerModeSecurityRequirements exposes the requirements-only threat model and RBAC vocabulary future shared/team mode must satisfy without enabling network sharing or weakening local-first SQLite mode.
For host integrations, prefer the public tool constructors such as NewGonchoContextTool, NewGonchoSearchTool, NewGonchoRecallTool, NewGonchoRememberTool, NewReviewTool, and NewGonchoHandoffTool so callers stay on the public boundary instead of database internals.
On pkg.go.dev, use the rendered pkg.go.dev examples as the shortest checked path through the API: ExampleNewService shows setup, ExampleService_Context shows orientation-pack assembly, ExampleService_Search shows scoped retrieval against stored conclusions, and ExampleService_Recall shows auditable recall traces.
go.dev package signals to check before adopting: the public module is currently v0.3.0, has a valid go.mod, a redistributable MIT license, and package documentation. Use make package-doc-smoke for this overview and its examples, make public-module-smoke for external imports, and make install-smoke for the cmd/goncho-bench command path.
Versioning and adoption notes: Goncho is pre-1.0, so read the go.dev Stable version signal as not yet v1-stable. For reproducible builds, pin with go get github.com/TrebuchetDynamics/goncho/service@v0.3.0 or a reviewed commit; @latest is a discovery shortcut, not a deployment lock. pkg.go.dev currently shows Imported by 0, but that reverse-dependency count is adoption context, not a correctness gate. Before upgrading a pinned host, run make ecosystem-smoke from a checkout.
Goncho is pre-1.0. Pin the module version or commit you deploy against, keep live verification in the host, and treat retrieved memory as orientation until current evidence confirms it.
Index ¶
- Constants
- Variables
- func CanRecallGonchoMemoryV1(ctx context.Context, db *sql.DB) (bool, error)
- func DefaultDecayCurve(createdAt time.Time, now time.Time) float64
- func DetectWorkspaceFromPath(start string) (workspaceRoot, marker string)
- func FormatRecallDiagnosticsReport(report RecallDiagnosticsReport) string
- func FormatRecallReplay(replay RecallReplay) string
- func GonchoMemoryV1Checksum(content string) string
- func GonchoMemoryV1ContractInfo() map[string]any
- func MemoryEntryRelevance(entry MemoryToolEntry, query string) float64
- func RunMigrations(db *sql.DB) error
- func SignWebhookPayload(payload, secret string) (string, error)
- func ValidDialecticLevel(level string) bool
- func ValidateGonchoMemoryV1Item(item GonchoMemoryV1Item) error
- func WorkspaceIDForPath(path string) string
- type ActionGraph
- type ActionGraphQuery
- type ActionLease
- type ActionLeaseAuditEvent
- type ActionLeaseAuditQuery
- type ActionLeaseAuditResult
- type ActionLeaseDecision
- type ActionLeaseExpireParams
- type ActionLeaseExpireResult
- type ActionLeaseParams
- type ActionLeaseResult
- type ActionNode
- type ActionParams
- type ActionSignal
- type ActionSignalParams
- type ActionSignalReceipt
- type ActionSignalReceiptAuditEvent
- type ActionSignalReceiptAuditQuery
- type ActionSignalReceiptAuditResult
- type ActionSignalReceiptDecision
- type ActionSignalReceiptList
- type ActionSignalReceiptParams
- type ActionSignalReceiptQuery
- type ActionSignalReceiptResult
- type ActionStatus
- type AuditAction
- type AuditEvent
- type AuditQuery
- type AuditResult
- type AuditTargetType
- type BenchmarkMetricComparison
- type BenchmarkTrendInput
- type BenchmarkTrendReport
- type ChatCompletionMetadata
- type ChatParams
- type ChatResult
- type ConcludeParams
- type ConcludeResult
- type Config
- type ConsolidatedMemory
- type ContextParams
- type ContextResult
- type ContextUnavailableEvidence
- type CreateMessage
- type CreateMessagesParams
- type CreateMessagesResult
- type CrossChatRecallEvidence
- type CrossChatSessionEvidence
- type CrossSessionKnowledge
- type CrossSessionMemory
- func (csm *CrossSessionMemory) DetectContradictions(ctx context.Context, newEntry MemoryToolEntry) ([]MemoryToolEntry, error)
- func (csm *CrossSessionMemory) LoadRelevant(ctx context.Context, query string, limit int) ([]MemoryToolEntry, error)
- func (csm *CrossSessionMemory) QueryKnowledge(ctx context.Context, query string, limit int) (CrossSessionKnowledge, error)
- type DialecticCaller
- type DialecticLevel
- type DiskUsageComponent
- type DiskUsageDiagnostics
- type DreamQueueStatus
- type DreamScheduleParams
- type DreamScheduleResult
- type DreamStatusEvidence
- type DriftAnchorCheckParams
- type DriftAnchorDetector
- type DriftAnchorWarning
- type EvalCandidateKind
- type EvalCandidateList
- type EvalCandidateQuery
- type EvalCandidateStatus
- type EvalFailure
- type EvalImprovementCandidate
- type EvalRegistryInput
- type EvalRegistryResult
- type EvictionCandidate
- type EvidenceItem
- type ExtractMemoryProposalsParams
- type ExtractMemoryProposalsResult
- type FileImportMetadata
- type FileImportResult
- type FilesystemWatcherCandidate
- type FilesystemWatcherImportParams
- type FilesystemWatcherImportResult
- type FilesystemWatcherPreview
- type FilesystemWatcherSkipped
- type ForgetMemoryTool
- func (t ForgetMemoryTool) Description() string
- func (t ForgetMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t ForgetMemoryTool) Name() string
- func (t ForgetMemoryTool) Schema() json.RawMessage
- func (t ForgetMemoryTool) Spec() toolmeta.OperationSpec
- func (t ForgetMemoryTool) Timeout() time.Duration
- type FourTierConsolidationParams
- type FourTierConsolidationResult
- type GonchoContextTool
- func (t *GonchoContextTool) Description() string
- func (t *GonchoContextTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GonchoContextTool) Name() string
- func (t *GonchoContextTool) Schema() json.RawMessage
- func (t *GonchoContextTool) Spec() toolmeta.OperationSpec
- func (t *GonchoContextTool) Timeout() time.Duration
- type GonchoHandoffTool
- func (t *GonchoHandoffTool) Description() string
- func (t *GonchoHandoffTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GonchoHandoffTool) Name() string
- func (t *GonchoHandoffTool) Schema() json.RawMessage
- func (t *GonchoHandoffTool) Spec() toolmeta.OperationSpec
- func (t *GonchoHandoffTool) Timeout() time.Duration
- type GonchoMarkdownStore
- type GonchoMarkdownStoreConfig
- type GonchoMemoryV1Document
- type GonchoMemoryV1Item
- type GonchoMemoryV1RecallRequest
- type GonchoMetaanalysisCoverageInput
- type GonchoMetaanalysisCoverageReport
- type GonchoPublicToolsRestartE2EConfig
- type GonchoPublicToolsRestartE2EReport
- type GonchoRecallTool
- func (t *GonchoRecallTool) Description() string
- func (t *GonchoRecallTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GonchoRecallTool) Name() string
- func (t *GonchoRecallTool) Schema() json.RawMessage
- func (t *GonchoRecallTool) Spec() toolmeta.OperationSpec
- func (t *GonchoRecallTool) Timeout() time.Duration
- type GonchoRememberTool
- func (t *GonchoRememberTool) Description() string
- func (t *GonchoRememberTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GonchoRememberTool) Name() string
- func (t *GonchoRememberTool) Schema() json.RawMessage
- func (t *GonchoRememberTool) Spec() toolmeta.OperationSpec
- func (t *GonchoRememberTool) Timeout() time.Duration
- type GonchoSearchTool
- func (t *GonchoSearchTool) Description() string
- func (t *GonchoSearchTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GonchoSearchTool) Name() string
- func (t *GonchoSearchTool) Schema() json.RawMessage
- func (t *GonchoSearchTool) Spec() toolmeta.OperationSpec
- func (t *GonchoSearchTool) Timeout() time.Duration
- type GraphExpansionIndex
- type GraphRelation
- type HonchoSDKCompatibilityHarness
- func (h *HonchoSDKCompatibilityHarness) ContextPreview(ctx context.Context, req HonchoSDKContextPreviewRequest) (HonchoSDKContextPreview, error)
- func (h *HonchoSDKCompatibilityHarness) Search(ctx context.Context, req HonchoSDKSearchRequest) (HonchoSDKSearchResponse, error)
- func (h *HonchoSDKCompatibilityHarness) SeedSession(ctx context.Context, seed HonchoSDKSessionSeed) (HonchoSDKSeedResult, error)
- type HonchoSDKConclusion
- type HonchoSDKContextPreview
- type HonchoSDKContextPreviewRequest
- type HonchoSDKContextSummary
- type HonchoSDKMessage
- type HonchoSDKMessageInput
- type HonchoSDKPeer
- type HonchoSDKSearchHit
- type HonchoSDKSearchRequest
- type HonchoSDKSearchResponse
- type HonchoSDKSeedResult
- type HonchoSDKSession
- type HonchoSDKSessionSeed
- type HonchoSDKUnsupportedFlow
- type HonchoSDKWorkspace
- type HookCaptureResult
- type HostHookEvent
- type HostHookEventName
- type HostHookEventSchema
- type ImageEmbeddingStatus
- type ImageMemory
- type ImageMemoryList
- type ImageMemoryParams
- type ImageMemoryQuery
- type ImportFileParams
- type ImportanceScorer
- func (s *ImportanceScorer) EffectiveImportance(entry MemoryToolEntry, now time.Time) float64
- func (s *ImportanceScorer) Rank(entries []MemoryToolEntry, relevanceByID map[string]float64, now time.Time) []ScoredMemory
- func (s *ImportanceScorer) RankByQuery(entries []MemoryToolEntry, query string, now time.Time) []ScoredMemory
- func (s *ImportanceScorer) ReviewRetentionCandidates(entries []MemoryToolEntry, policy RetentionPolicy) []RetentionCandidate
- func (s *ImportanceScorer) Score(entry MemoryToolEntry, relevanceScore float64, now time.Time) float64
- type ImportedFileMessage
- type LocalMarkdownMemoryConfig
- type LocalMarkdownMemoryStatus
- type LocalMarkdownMemoryStore
- func (s *LocalMarkdownMemoryStore) Forget(ctx context.Context, id string) error
- func (s *LocalMarkdownMemoryStore) Retrieve(ctx context.Context, query string, limit int) ([]MemoryToolEntry, error)
- func (s *LocalMarkdownMemoryStore) Status(ctx context.Context) (LocalMarkdownMemoryStatus, error)
- func (s *LocalMarkdownMemoryStore) Store(ctx context.Context, entry MemoryToolEntry) error
- func (s *LocalMarkdownMemoryStore) Update(ctx context.Context, id string, content string) error
- func (s *LocalMarkdownMemoryStore) UpdateImportance(ctx context.Context, id string, importance float64) error
- type LocalVectorIndex
- type LocalVectorIndexDiagnostics
- type LocalVectorIndexOptions
- type LocalVectorMemory
- type MemoryAddParams
- type MemoryConsolidationTier
- type MemoryContradiction
- type MemoryDeleteParams
- type MemoryFacade
- func (f *MemoryFacade) Add(ctx context.Context, p MemoryAddParams) (MemoryItem, error)
- func (f *MemoryFacade) Delete(ctx context.Context, p MemoryDeleteParams) (MemoryItem, error)
- func (f *MemoryFacade) Get(ctx context.Context, p MemoryGetParams) (MemoryItem, error)
- func (f *MemoryFacade) History(ctx context.Context, p MemoryHistoryParams) (MemoryHistoryResult, error)
- func (f *MemoryFacade) Search(ctx context.Context, p MemorySearchParams) (MemorySearchResult, error)
- func (f *MemoryFacade) Update(ctx context.Context, p MemoryUpdateParams) (MemoryItem, error)
- type MemoryGetParams
- type MemoryHistoryEvent
- type MemoryHistoryParams
- type MemoryHistoryResult
- type MemoryImportanceUpdater
- type MemoryItem
- type MemoryNamespace
- type MemoryProposal
- type MemoryProposalKind
- type MemoryProposalOperation
- type MemoryProposalStatus
- type MemoryResourceContent
- type MemoryResourceDescriptor
- type MemoryResourceKind
- type MemoryResourceRegistry
- type MemoryResourceRequest
- type MemorySearchParams
- type MemorySearchResult
- type MemorySlot
- type MemorySlotList
- type MemorySlotParams
- type MemorySlotQuery
- type MemoryToolEntry
- type MemoryToolStore
- type MemoryUpdateParams
- type MemoryV1ToolContractInfo
- type MemoryV1ToolSpec
- type MemoryV1ToolTranscriptEntry
- type Message
- type MessageRecord
- type MessageSearchHit
- type MessageSlice
- type Observation
- type ObservationDecision
- type ObservationKind
- type ObservationList
- type ObservationParams
- type ObservationQuery
- type ObservationRequest
- type ObservationResult
- type PeerIdentityDecision
- type PeerRole
- type PortableExportManifest
- type PortableExportParams
- type PortableExportRecord
- type PortableExportResult
- type PortableImportConflict
- type PortableImportParams
- type PortableImportPreview
- type PortableImportResult
- type PortableRedactionSummary
- type ProfileHint
- type ProfileResult
- type ProposalWindow
- type ProviderCircuitBreaker
- type ProviderCircuitBreakerConfig
- type ProviderCircuitState
- type ProviderHealth
- type ProviderHealthDiagnostics
- type ProviderHealthRegistry
- type ProviderKind
- type ProviderResilienceConfig
- type ProviderStatus
- type QueueEmptyWebhookEventParams
- type QueueStatus
- type QueueStatusConfig
- type QueueWorkUnitStatus
- type RecallBenchmarkAbilityReport
- type RecallBenchmarkCase
- type RecallBenchmarkCaseReport
- type RecallBenchmarkLatency
- type RecallBenchmarkReport
- type RecallBenchmarkServiceCase
- type RecallBenchmarkServiceMemory
- type RecallCandidate
- type RecallDiagnosticsCandidate
- type RecallDiagnosticsRejection
- type RecallDiagnosticsReport
- type RecallEngine
- type RecallFeedback
- type RecallFeedbackLabel
- type RecallFeedbackList
- type RecallFeedbackParams
- type RecallFeedbackQuery
- type RecallFeedbackStatus
- type RecallProjector
- type RecallQuery
- type RecallReplay
- type RecallReplayEvent
- type RecallScore
- type RecallScoringConfig
- type RecallTrace
- type RecallWarning
- type RegressionGateInput
- type RegressionGateResult
- type RejectedRecallCandidate
- type RetentionAction
- type RetentionApplyResult
- type RetentionAuditEvent
- type RetentionAuditQuery
- type RetentionAuditResult
- type RetentionCandidate
- type RetentionPolicy
- type RetentionPolicyView
- type RetentionPreview
- type RetrieveMemoryTool
- func (t RetrieveMemoryTool) Description() string
- func (t RetrieveMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t RetrieveMemoryTool) Name() string
- func (t RetrieveMemoryTool) Schema() json.RawMessage
- func (t RetrieveMemoryTool) Spec() toolmeta.OperationSpec
- func (t RetrieveMemoryTool) Timeout() time.Duration
- type ReviewItem
- type ReviewItemCreateParams
- type ReviewKind
- type ReviewList
- type ReviewQuery
- type ReviewResolution
- type ReviewResolutionParams
- type ReviewStatus
- type ReviewTool
- func (t *ReviewTool) Description() string
- func (t *ReviewTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *ReviewTool) Name() string
- func (t *ReviewTool) Schema() json.RawMessage
- func (t *ReviewTool) Spec() toolmeta.OperationSpec
- func (t *ReviewTool) Timeout() time.Duration
- type ScoredMemory
- type ScoredRecallCandidate
- type SearchFilter
- type SearchHit
- type SearchLineage
- type SearchParams
- type SearchResultSet
- type ServerModeSecurityRequirement
- type ServerModeSecurityStatus
- type Service
- func (s *Service) AcquireActionLease(ctx context.Context, params ActionLeaseParams) (ActionLeaseResult, error)
- func (s *Service) AppendMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
- func (s *Service) ApplyRetention(ctx context.Context, policy RetentionPolicy, appliedBy string) (RetentionApplyResult, error)
- func (s *Service) ApproveSkillLearningProposal(ctx context.Context, p SkillLearningProposalReviewParams) (SkillLearningProposal, error)
- func (s *Service) AuditTrail(ctx context.Context, q AuditQuery) (AuditResult, error)
- func (s *Service) CaptureHostHook(ctx context.Context, event HostHookEvent) (HookCaptureResult, error)
- func (s *Service) Chat(ctx context.Context, peer string, params ChatParams) (ChatResult, error)
- func (s *Service) CompleteAction(ctx context.Context, query ActionGraphQuery) (ActionNode, error)
- func (s *Service) Conclude(ctx context.Context, params ConcludeParams) (ConcludeResult, error)
- func (s *Service) Context(ctx context.Context, params ContextParams) (ContextResult, error)
- func (s *Service) CreateMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
- func (s *Service) CreateMessages(ctx context.Context, params CreateMessagesParams) (CreateMessagesResult, error)
- func (s *Service) CreateReviewItem(ctx context.Context, p ReviewItemCreateParams) (ReviewItem, error)
- func (s *Service) DeleteMemorySlot(ctx context.Context, query MemorySlotQuery) (MemorySlot, error)
- func (s *Service) DeleteSession(ctx context.Context, sessionKey string) (SessionDeletionResult, error)
- func (s *Service) DeleteWebhookEndpoint(ctx context.Context, workspaceID, endpointID string) error
- func (s *Service) DeleteWorkspace(ctx context.Context) (WorkspaceDeletionResult, error)
- func (s *Service) DialecticCaller() DialecticCaller
- func (s *Service) DiskUsage(ctx context.Context, policy RetentionPolicy) (DiskUsageDiagnostics, error)
- func (s *Service) ExecuteDreamCompression(ctx context.Context) (int, error)
- func (s *Service) ExecuteDreamFactExtraction(ctx context.Context, sessionKey string) (int, error)
- func (s *Service) ExecuteFourTierConsolidation(ctx context.Context, params FourTierConsolidationParams) (FourTierConsolidationResult, error)
- func (s *Service) ExpireActionLeases(ctx context.Context, params ActionLeaseExpireParams) (ActionLeaseExpireResult, error)
- func (s *Service) ExportPortableJSONL(ctx context.Context, params PortableExportParams) (PortableExportResult, error)
- func (s *Service) ExportPortableMarkdown(ctx context.Context, params PortableExportParams) (string, error)
- func (s *Service) ExportSnapshotManifest(ctx context.Context, params SnapshotParams) (SnapshotManifest, error)
- func (s *Service) ExtractMemoryProposals(ctx context.Context, params ExtractMemoryProposalsParams) (ExtractMemoryProposalsResult, error)
- func (s *Service) GetMemorySlot(ctx context.Context, query MemorySlotQuery) (MemorySlot, error)
- func (s *Service) GetOrCreateWebhookEndpoint(ctx context.Context, params WebhookEndpointCreateParams) (WebhookEndpointCreateResult, error)
- func (s *Service) GetSkillLearningProposal(ctx context.Context, proposalID string) (SkillLearningProposal, error)
- func (s *Service) ImportFile(ctx context.Context, params ImportFileParams) (FileImportResult, error)
- func (s *Service) ImportFilesystemWatcherChanges(ctx context.Context, params FilesystemWatcherImportParams) (FilesystemWatcherImportResult, error)
- func (s *Service) ImportPortableJSONL(ctx context.Context, params PortableImportParams) (PortableImportResult, error)
- func (s *Service) ListActionLeaseAudit(ctx context.Context, query ActionLeaseAuditQuery) (ActionLeaseAuditResult, error)
- func (s *Service) ListActionSignalReceiptAudit(ctx context.Context, query ActionSignalReceiptAuditQuery) (ActionSignalReceiptAuditResult, error)
- func (s *Service) ListActionSignalReceipts(ctx context.Context, query ActionSignalReceiptQuery) (ActionSignalReceiptList, error)
- func (s *Service) ListEvalCandidates(ctx context.Context, q EvalCandidateQuery) (EvalCandidateList, error)
- func (s *Service) ListMemorySlots(ctx context.Context, query MemorySlotQuery) (MemorySlotList, error)
- func (s *Service) ListObservations(ctx context.Context, q ObservationQuery) (ObservationList, error)
- func (s *Service) ListPendingSkillLearningProposals(ctx context.Context, q SkillLearningProposalQuery) (SkillLearningProposalList, error)
- func (s *Service) ListRecallFeedback(ctx context.Context, q RecallFeedbackQuery) (RecallFeedbackList, error)
- func (s *Service) ListReviewItems(ctx context.Context, q ReviewQuery) (ReviewList, error)
- func (s *Service) ListTeamFeedAudit(ctx context.Context, query TeamFeedAuditQuery) (TeamFeedAuditResult, error)
- func (s *Service) ListWebhookEndpoints(ctx context.Context, workspaceID string) ([]WebhookEndpoint, error)
- func (s *Service) NewStreamingChatPersistence(peer string, params ChatParams) (*StreamingChatPersistence, error)
- func (s *Service) Observe(ctx context.Context, p ObservationParams) (ObservationResult, error)
- func (s *Service) OnSessionEnd(ctx context.Context, sessionKey string, messages []Message) error
- func (s *Service) PreviewFilesystemWatcherImport(ctx context.Context, params FilesystemWatcherImportParams) (FilesystemWatcherPreview, error)
- func (s *Service) PreviewPortableImport(ctx context.Context, jsonl []byte) (PortableImportPreview, error)
- func (s *Service) PreviewRetention(ctx context.Context, policy RetentionPolicy) (RetentionPreview, error)
- func (s *Service) Profile(ctx context.Context, peer string) (ProfileResult, error)
- func (s *Service) ProfileForTarget(ctx context.Context, peer, target string) (ProfileResult, error)
- func (s *Service) ProfileInNamespace(ctx context.Context, ns MemoryNamespace) (ProfileResult, error)
- func (s *Service) ProviderHealthDiagnostics() ProviderHealthDiagnostics
- func (s *Service) ReadActionGraph(ctx context.Context, query ActionGraphQuery) (ActionGraph, error)
- func (s *Service) Recall(ctx context.Context, q RecallQuery) (RecallTrace, error)
- func (s *Service) RecordActionSignalReceipt(ctx context.Context, params ActionSignalReceiptParams) (ActionSignalReceiptResult, error)
- func (s *Service) RecordEvalFailures(ctx context.Context, input EvalRegistryInput) (EvalRegistryResult, error)
- func (s *Service) RecordRecallFeedback(ctx context.Context, params RecallFeedbackParams) (RecallFeedback, error)
- func (s *Service) RecordSkillOutcome(ctx context.Context, outcome SkillOutcome) error
- func (s *Service) RejectSkillLearningProposal(ctx context.Context, p SkillLearningProposalReviewParams) (SkillLearningProposal, error)
- func (s *Service) RenewActionLease(ctx context.Context, params ActionLeaseParams) (ActionLeaseResult, error)
- func (s *Service) ReplaceMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
- func (s *Service) ResolveReviewItem(ctx context.Context, p ReviewResolutionParams) (ReviewItem, error)
- func (s *Service) RetentionAudit(ctx context.Context, q RetentionAuditQuery) (RetentionAuditResult, error)
- func (s *Service) ScheduleDream(ctx context.Context, params DreamScheduleParams) (DreamScheduleResult, error)
- func (s *Service) Search(ctx context.Context, params SearchParams) (SearchResultSet, error)
- func (s *Service) SearchImageMemories(ctx context.Context, query ImageMemoryQuery) (ImageMemoryList, error)
- func (s *Service) SearchSkillOutcomes(ctx context.Context, skillName string, limit int) ([]string, error)
- func (s *Service) SetDialecticCaller(dc DialecticCaller)
- func (s *Service) SetProfile(ctx context.Context, peer string, card []string) error
- func (s *Service) SetProfileForTarget(ctx context.Context, peer, target string, card []string) error
- func (s *Service) SetProfileInNamespace(ctx context.Context, ns MemoryNamespace, card []string) error
- func (s *Service) SignalAction(ctx context.Context, params ActionSignalParams) (ActionSignal, error)
- func (s *Service) StoreImageMemory(ctx context.Context, params ImageMemoryParams) (ImageMemory, error)
- func (s *Service) SubmitSkillLearningProposal(ctx context.Context, p SkillLearningProposalCreateParams) (SkillLearningProposalRef, error)
- func (s *Service) TeamFeed(ctx context.Context, query TeamFeedQuery) (TeamFeedResult, error)
- func (s *Service) UpsertAction(ctx context.Context, params ActionParams) (ActionNode, error)
- func (s *Service) VerifiedCodeContext(ctx context.Context, params VerifiedCodeContextParams) (VerifiedCodeContextResult, error)
- func (s *Service) ViewerSessionTimeline(ctx context.Context, sessionKey string) (ViewerSessionTimeline, error)
- func (s *Service) ViewerSnapshot(ctx context.Context) (ViewerSnapshot, error)
- type SessionBoundaryDecision
- type SessionBoundaryKind
- type SessionBoundaryRequest
- type SessionDeletionResult
- type SessionDirectory
- type SessionMemoryDeletionPlan
- type SessionMetadata
- type SessionSummary
- type SkillLearningProposal
- type SkillLearningProposalCreateParams
- type SkillLearningProposalList
- type SkillLearningProposalQuery
- type SkillLearningProposalRef
- type SkillLearningProposalReviewParams
- type SkillLearningProposalStatus
- type SkillOutcome
- type SnapshotDiff
- type SnapshotEntry
- type SnapshotGitMetadata
- type SnapshotManifest
- type SnapshotParams
- type SnapshotRollbackMetadata
- type StoreMemoryTool
- func (t StoreMemoryTool) Description() string
- func (t StoreMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t StoreMemoryTool) Name() string
- func (t StoreMemoryTool) Schema() json.RawMessage
- func (t StoreMemoryTool) Spec() toolmeta.OperationSpec
- func (t StoreMemoryTool) Timeout() time.Duration
- type StreamingChatPersistence
- type StructuredSummary
- type SummarizeMemoryTool
- func (t SummarizeMemoryTool) Description() string
- func (t SummarizeMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t SummarizeMemoryTool) Name() string
- func (t SummarizeMemoryTool) Schema() json.RawMessage
- func (t SummarizeMemoryTool) Spec() toolmeta.OperationSpec
- func (t SummarizeMemoryTool) Timeout() time.Duration
- type TeamFeedAuditEvent
- type TeamFeedAuditQuery
- type TeamFeedAuditResult
- type TeamFeedDecision
- type TeamFeedEntry
- type TeamFeedQuery
- type TeamFeedResult
- type TextEmbeddingProvider
- type UnsupportedFilterError
- type UpdateMemoryTool
- func (t UpdateMemoryTool) Description() string
- func (t UpdateMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t UpdateMemoryTool) Name() string
- func (t UpdateMemoryTool) Schema() json.RawMessage
- func (t UpdateMemoryTool) Spec() toolmeta.OperationSpec
- func (t UpdateMemoryTool) Timeout() time.Duration
- type VectorSearchHit
- type VectorSearchQuery
- type VectorStore
- type VerifiedCodeClaim
- type VerifiedCodeContextParams
- type VerifiedCodeContextResult
- type ViewerConclusion
- type ViewerCounts
- type ViewerDBInfo
- type ViewerReviewQueue
- type ViewerSessionTimeline
- type ViewerSnapshot
- type ViewerTimelineEvent
- type WebhookClock
- type WebhookDeliveryAttempt
- type WebhookDeliveryEndpoint
- type WebhookDeliveryErrorClass
- type WebhookDeliveryEvidence
- type WebhookDeliveryRequest
- type WebhookDeliveryResult
- type WebhookDeliveryStatus
- type WebhookDeliveryStore
- type WebhookDeliveryWorker
- type WebhookEndpoint
- type WebhookEndpointCreateParams
- type WebhookEndpointCreateResult
- type WebhookEvent
- type WebhookEventType
- type WebhookHTTPClient
- type WebhookHTTPRequest
- type WebhookHTTPResponse
- type WorkspaceDecision
- type WorkspaceDeletionResult
- type WorkspaceRequest
- type WorkspaceStrategy
Examples ¶
Constants ¶
const ( CrossChatDecisionAllowed = "allowed" CrossChatDecisionDenied = "denied" CrossChatDecisionDegraded = "degraded" CrossChatFallbackSameChat = "same-chat" )
Cross-chat recall constants.
const ( LineageKindPrimary = "primary" LineageKindCompression = "compression" LineageKindFork = "fork" LineageStatusOK = "ok" LineageStatusMissing = "missing" LineageStatusOrphan = "orphan" LineageStatusLoop = "loop" LineageStatusError = "error" )
Lineage constants (mirrors internal/session).
const ( GonchoMemoryV1ContractVersion = "1" GonchoMemoryV1MarkdownFormat = "1" GonchoMemoryV1MCPToolContract = "1" )
Goncho Memory V1 constants.
const ( RecallBenchmarkCorpusVersion = "goncho-recall-benchmark-v1" RecallBenchmarkServicePipelineVersion = "goncho-recall-benchmark-service-v1" RecallBenchmarkWarningMissingTrace = "benchmark_missing_trace" RecallBenchmarkWarningNoRelevantIDs = "benchmark_no_relevant_ids" )
const ( GraphRelationAccepted = "accepted" GraphRelationPending = "pending" )
const ( RecallStageGenerate = "generate" RecallStageScore = "score" RecallStageSelect = "select" RecallStageProject = "project" RecallWarningInfo = "info" RecallWarningDegraded = "degraded" RecallWarningError = "error" RecallWarningGraphDisabled = "graph_disabled" RecallWarningStaleEmbeddingIndex = "stale_embedding_index" RecallWarningScopeExcludedAllCandidates = "scope_excluded_all_candidates" RecallWarningTokenBudgetTruncated = "token_budget_truncated" RecallWarningSupersededEvidenceObserved = "superseded_evidence_observed" RecallRejectScopeMismatch = "scope_mismatch" RecallRejectTokenBudget = "token_budget" RecallRejectNotSelected = "not_selected" )
const ( RecallReplayStageQuery = "query" RecallReplayStageWarn = "warn" RecallReplayKindQuery = "recall_query" RecallReplayKindCandidate = "candidate_scored" RecallReplayKindWarning = "warning" RecallReplayKindSelected = "selected" RecallReplayKindRejected = "rejected" RecallReplayKindProject = "projection_ready" )
const ( EvidenceDefaultWorkspace = "default_workspace:" + DefaultWorkspaceID EvidenceHardIsolation = "workspace:hard_isolation" EvidenceCanonicalUserID = "peer:session_metadata_user_id" EvidenceExternalPeerFallback = "peer:source_prefixed_external_fallback" EvidenceCrossPeerOptIn = "observation:cross_peer_opt_in" )
const ( MemoryScopeProfile = "profile" MemoryScopeWorkspace = "workspace" MemoryScopeSession = "session" MemoryScopeGlobal = "global" )
const ( DefaultRecentMessages = 4 DefaultMaxMessageSize = 25_000 DefaultMaxFileSize = 5_242_880 DefaultGetContextMaxTokens = 100_000 DefaultDeriverWorkers = 1 DefaultRepresentationBatchMaxTokens = 1024 DefaultDreamMinConclusions = 50 DefaultDreamCooldown = 8 * time.Hour DefaultDreamIdleTimeout = time.Hour )
const ( DefaultWebhookWorkspaceLimit = webhookspkg.DefaultWebhookWorkspaceLimit MaxWebhookURLLength = webhookspkg.MaxWebhookURLLength )
const ( DefaultWorkspaceID = workspacepkg.DefaultWorkspaceID GlobalWorkspaceID = workspacepkg.GlobalWorkspaceID )
const DefaultObserverPeerID = "gormes"
const GonchoSQLiteSchemaVersion = "goncho-sqlite-v1"
const PortableExportSchemaVersion = "goncho-portable-v1"
Variables ¶
var ( ErrObservationConflict = observationlog.ErrObservationConflict ErrObservationNotFound = observationlog.ErrObservationNotFound ErrObservationSchemaMissing = observationlog.ErrObservationSchemaMissing ErrObservationInvalid = observationlog.ErrObservationInvalid )
var ( ErrWorkspacePerUser = errors.New("goncho: workspace-per-user topology is not allowed") ErrWorkspaceRequiresHardIsolation = errors.New("goncho: explicit workspace requires hard isolation") ErrWorkspaceRequired = errors.New("goncho: hard-isolation workspace is required") ErrPeerIdentityRequired = errors.New("goncho: peer identity requires user_id or source/chat_id") ErrSessionBoundaryRequired = errors.New("goncho: session boundary is required") )
var ( ErrWebhookWorkspaceRequired = webhookspkg.ErrWebhookWorkspaceRequired ErrWebhookInvalidURL = webhookspkg.ErrWebhookInvalidURL ErrWebhookLimitReached = webhookspkg.ErrWebhookLimitReached ErrWebhookNotFound = webhookspkg.ErrWebhookNotFound ErrWebhookSecretMissing = webhookspkg.ErrWebhookSecretMissing )
var ErrMemoryNotFound = errors.New("goncho: memory not found")
var ErrMemorySlotConflict = errors.New("goncho: memory slot conflict")
var ErrMemorySlotNotFound = errors.New("goncho: memory slot not found")
var ErrProviderCircuitOpen = errors.New("goncho: provider circuit open")
var ErrUserScopeDenied = errors.New("memory: user scope denied")
var QueueTaskTypes = queuestatus.TaskTypes
QueueTaskTypes are the only Honcho-style reasoning work units that Goncho reports. Delivery, deletion, and vector reconciliation counters are deliberately excluded because queue status is observability, not sync.
Functions ¶
func CanRecallGonchoMemoryV1 ¶
CanRecallGonchoMemoryV1 checks if the V1 memory tables exist.
func DetectWorkspaceFromPath ¶
DetectWorkspaceFromPath finds the workspace root by looking for project markers. Returns the directory containing the marker and the marker filename.
func FormatRecallDiagnosticsReport ¶
func FormatRecallDiagnosticsReport(report RecallDiagnosticsReport) string
func FormatRecallReplay ¶
func FormatRecallReplay(replay RecallReplay) string
func GonchoMemoryV1Checksum ¶
GonchoMemoryV1Checksum returns a SHA-256 hex digest of the content.
func GonchoMemoryV1ContractInfo ¶
GonchoMemoryV1ContractInfo returns the V1 contract metadata.
func MemoryEntryRelevance ¶
func MemoryEntryRelevance(entry MemoryToolEntry, query string) float64
func RunMigrations ¶
func SignWebhookPayload ¶
func ValidDialecticLevel ¶
func ValidateGonchoMemoryV1Item ¶
func ValidateGonchoMemoryV1Item(item GonchoMemoryV1Item) error
ValidateGonchoMemoryV1Item checks required fields on a V1 item.
func WorkspaceIDForPath ¶
WorkspaceIDForPath returns a stable workspace ID derived from the project root.
Types ¶
type ActionGraph ¶
type ActionGraph struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Nodes []ActionNode `json:"nodes"`
Frontier []ActionNode `json:"frontier"`
NextAction *ActionNode `json:"next_action,omitempty"`
}
type ActionGraphQuery ¶
type ActionLease ¶ added in v0.3.0
type ActionLease struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
Owner string `json:"owner"`
AcquiredAt int64 `json:"acquired_at"`
RenewedAt int64 `json:"renewed_at"`
ExpiresAt int64 `json:"expires_at"`
}
type ActionLeaseAuditEvent ¶ added in v0.3.0
type ActionLeaseAuditEvent struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
Actor string `json:"actor"`
Decision ActionLeaseDecision `json:"decision"`
Reason string `json:"reason,omitempty"`
ExpiresAt int64 `json:"expires_at,omitempty"`
CreatedAt int64 `json:"created_at"`
}
type ActionLeaseAuditQuery ¶ added in v0.3.0
type ActionLeaseAuditResult ¶ added in v0.3.0
type ActionLeaseAuditResult struct {
Events []ActionLeaseAuditEvent `json:"events"`
Count int `json:"count"`
}
type ActionLeaseDecision ¶ added in v0.3.0
type ActionLeaseDecision string
const ( ActionLeaseDecisionAcquired ActionLeaseDecision = "acquired" ActionLeaseDecisionHeldByOther ActionLeaseDecision = "held_by_other" ActionLeaseDecisionRenewed ActionLeaseDecision = "renewed" ActionLeaseDecisionExpired ActionLeaseDecision = "expired" )
type ActionLeaseExpireParams ¶ added in v0.3.0
type ActionLeaseExpireResult ¶ added in v0.3.0
type ActionLeaseExpireResult struct {
ExpiredCount int `json:"expired_count"`
Events []ActionLeaseAuditEvent `json:"events"`
}
type ActionLeaseParams ¶ added in v0.3.0
type ActionLeaseResult ¶ added in v0.3.0
type ActionLeaseResult struct {
Acquired bool `json:"acquired"`
Decision ActionLeaseDecision `json:"decision"`
Lease ActionLease `json:"lease"`
Reason string `json:"reason,omitempty"`
AuditID int64 `json:"audit_id,omitempty"`
}
type ActionNode ¶
type ActionNode struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
Title string `json:"title"`
Status ActionStatus `json:"status"`
DependsOn []string `json:"depends_on,omitempty"`
Signals []ActionSignal `json:"signals,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type ActionParams ¶
type ActionSignal ¶
type ActionSignalParams ¶
type ActionSignalParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
Signal string `json:"signal"`
Message string `json:"message,omitempty"`
Actor string `json:"actor,omitempty"`
}
type ActionSignalReceipt ¶ added in v0.3.0
type ActionSignalReceiptAuditEvent ¶ added in v0.3.0
type ActionSignalReceiptAuditEvent struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
SignalID int64 `json:"signal_id"`
Actor string `json:"actor"`
ActorWorkspaceID string `json:"actor_workspace_id,omitempty"`
ActorProfileID string `json:"actor_profile_id,omitempty"`
Decision ActionSignalReceiptDecision `json:"decision"`
Reason string `json:"reason,omitempty"`
CreatedAt int64 `json:"created_at"`
}
type ActionSignalReceiptAuditQuery ¶ added in v0.3.0
type ActionSignalReceiptAuditResult ¶ added in v0.3.0
type ActionSignalReceiptAuditResult struct {
Events []ActionSignalReceiptAuditEvent `json:"events"`
Count int `json:"count"`
}
type ActionSignalReceiptDecision ¶ added in v0.3.0
type ActionSignalReceiptDecision string
const ( ActionSignalReceiptDecisionAllowed ActionSignalReceiptDecision = "allowed" ActionSignalReceiptDecisionDenied ActionSignalReceiptDecision = "denied" )
type ActionSignalReceiptList ¶ added in v0.3.0
type ActionSignalReceiptList struct {
Receipts []ActionSignalReceipt `json:"receipts"`
Count int `json:"count"`
}
type ActionSignalReceiptParams ¶ added in v0.3.0
type ActionSignalReceiptParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
SignalID int64 `json:"signal_id"`
Actor string `json:"actor"`
ActorWorkspaceID string `json:"actor_workspace_id,omitempty"`
ActorProfileID string `json:"actor_profile_id,omitempty"`
}
type ActionSignalReceiptQuery ¶ added in v0.3.0
type ActionSignalReceiptResult ¶ added in v0.3.0
type ActionSignalReceiptResult struct {
Authorized bool `json:"authorized"`
Decision ActionSignalReceiptDecision `json:"decision"`
Receipt ActionSignalReceipt `json:"receipt,omitempty"`
Reason string `json:"reason,omitempty"`
AuditID int64 `json:"audit_id,omitempty"`
}
type ActionStatus ¶
type ActionStatus string
const ( ActionStatusPending ActionStatus = "pending" ActionStatusDone ActionStatus = "done" )
type AuditAction ¶
type AuditAction = observationlog.AuditAction
const (
AuditActionObserve AuditAction = observationlog.AuditActionObserve
)
type AuditEvent ¶
type AuditEvent = observationlog.AuditEvent
type AuditQuery ¶
type AuditQuery = observationlog.AuditQuery
type AuditResult ¶
type AuditResult = observationlog.AuditResult
func AuditTrail ¶
func AuditTrail(ctx context.Context, db *sql.DB, q AuditQuery) (AuditResult, error)
type AuditTargetType ¶
type AuditTargetType = observationlog.AuditTargetType
const (
AuditTargetObservation AuditTargetType = observationlog.AuditTargetObservation
)
type BenchmarkMetricComparison ¶ added in v0.3.0
type BenchmarkTrendInput ¶ added in v0.3.0
type BenchmarkTrendInput struct {
BaselineID string `json:"baseline_id"`
CandidateID string `json:"candidate_id"`
Metrics []BenchmarkMetricComparison `json:"metrics"`
}
type BenchmarkTrendReport ¶ added in v0.3.0
type BenchmarkTrendReport struct {
BaselineID string `json:"baseline_id"`
CandidateID string `json:"candidate_id"`
Status string `json:"status"`
Gates []RegressionGateResult `json:"gates"`
}
func BuildBenchmarkTrendReport ¶ added in v0.3.0
func BuildBenchmarkTrendReport(input BenchmarkTrendInput) BenchmarkTrendReport
type ChatCompletionMetadata ¶
type ChatCompletionMetadata struct {
TokensIn int `json:"tokens_in,omitempty"`
TokensOut int `json:"tokens_out,omitempty"`
}
ChatCompletionMetadata carries terminal stream metadata that can be attached after the assistant response is complete.
type ChatParams ¶
type ChatParams struct {
SessionID string `json:"session_id,omitempty"`
Target string `json:"target,omitempty"`
Query string `json:"query"`
Stream bool `json:"stream,omitempty"`
ReasoningLevel string `json:"reasoning_level,omitempty"`
}
ChatParams mirrors Honcho's DialecticOptions request body for peer.chat(). The peer itself is path/tool context, so it is passed separately to Service.Chat.
type ChatResult ¶
type ChatResult struct {
Content string `json:"content"`
}
ChatResult is Honcho's non-streaming dialectic response shape.
type ConcludeParams ¶
type ConcludeParams struct {
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Conclusion string `json:"conclusion,omitempty"`
DeleteID int64 `json:"delete_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
Scope string `json:"scope,omitempty"`
}
ConcludeParams controls manual conclusion writes and deletes.
type ConcludeResult ¶
type ConcludeResult struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ID int64 `json:"id,omitempty"`
Status string `json:"status"`
Deleted bool `json:"deleted,omitempty"`
}
ConcludeResult is the stable JSON shape for honcho_conclude. ConcludeResult represents the outcome of a create/delete conclusion operation.
type Config ¶
type Config struct {
Enabled bool
WorkspaceID string
ObserverPeerID string
RecentMessages int
MaxMessageSize int
MaxFileSize int
GetContextMaxTokens int
ReasoningEnabled bool
PeerCardEnabled bool
SummaryEnabled bool
DreamEnabled bool
DreamIdleTimeout time.Duration
DeriverWorkers int
RepresentationBatchMaxTokens int
DialecticDefaultLevel DialecticLevel
SessionDirectory SessionDirectory
VectorStore VectorStore
ProviderFailureThreshold int
ProviderCooldown time.Duration
ProviderTimeout time.Duration
ProviderMaxPayloadBytes int
}
Config controls the minimal Goncho service defaults for a runtime.
type ConsolidatedMemory ¶
type ConsolidatedMemory struct {
Tier MemoryConsolidationTier `json:"tier"`
MemoryID int64 `json:"memory_id"`
Content string `json:"content"`
Provenance []EvidenceItem `json:"provenance"`
}
type ContextParams ¶
type ContextParams struct {
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Query string `json:"query,omitempty"`
SearchQuery string `json:"search_query,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Tokens int `json:"tokens,omitempty"`
Summary *bool `json:"summary,omitempty"`
SessionKey string `json:"session_key,omitempty"`
Scope string `json:"scope,omitempty"`
Sources []string `json:"sources,omitempty"`
PeerTarget string `json:"peer_target,omitempty"`
PeerPerspective string `json:"peer_perspective,omitempty"`
LimitToSession *bool `json:"limit_to_session,omitempty"`
SearchTopK *int `json:"search_top_k,omitempty"`
SearchMaxDistance *float64 `json:"search_max_distance,omitempty"`
IncludeMostFrequent *bool `json:"include_most_frequent,omitempty"`
MaxConclusions *int `json:"max_conclusions,omitempty"`
IncludeDreamStatus *bool `json:"include_dream_status,omitempty"`
}
ContextParams controls honcho_context reads.
type ContextResult ¶
type ContextResult struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ObserverPeerID string `json:"observer_peer_id,omitempty"`
ObservedPeerID string `json:"observed_peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
PeerCard []string `json:"peer_card"`
Representation string `json:"representation"`
Summary *SessionSummary `json:"summary,omitempty"`
StructuredSummary *StructuredSummary `json:"structured_summary,omitempty"`
Conclusions []string `json:"conclusions,omitempty"`
SearchResults []SearchHit `json:"search_results,omitempty"`
ScopeEvidence *CrossChatRecallEvidence `json:"scope_evidence,omitempty"`
RecentMessages []MessageSlice `json:"recent_messages,omitempty"`
}
ContextResult is the stable JSON shape for honcho_context.
type ContextUnavailableEvidence ¶
type ContextUnavailableEvidence struct {
}
ContextUnavailableEvidence names a requested context capability that Goncho accepted but cannot yet fulfill with the current local storage model.
type CreateMessage ¶
type CreateMessagesParams ¶
type CreateMessagesParams struct {
SessionKey string `json:"session_key"`
Messages []CreateMessage `json:"messages"`
}
CreateMessagesParams mirrors Honcho's session message creation contract at the local Goncho service boundary.
type CreateMessagesResult ¶
type CreateMessagesResult struct {
WorkspaceID string `json:"workspace_id"`
SessionKey string `json:"session_key"`
Messages []MessageRecord `json:"messages"`
}
type CrossChatRecallEvidence ¶
type CrossChatRecallEvidence struct {
Decision string `json:"decision"`
Scope string `json:"scope"`
FallbackScope string `json:"fallback_scope,omitempty"`
Reason string `json:"reason,omitempty"`
UserID string `json:"user_id,omitempty"`
CurrentSessionID string `json:"current_session_id,omitempty"`
CurrentChatKey string `json:"current_chat_key,omitempty"`
CurrentBinding *CrossChatSessionEvidence `json:"current_binding,omitempty"`
SourceAllowlist []string `json:"source_allowlist,omitempty"`
SessionsConsidered int `json:"sessions_considered"`
WidenedSessionsConsidered int `json:"widened_sessions_considered"`
Sessions []CrossChatSessionEvidence `json:"sessions,omitempty"`
}
CrossChatRecallEvidence explains why a user-scoped recall/search request was allowed, denied, or degraded.
func DegradedCrossChatRecallEvidence ¶
func DegradedCrossChatRecallEvidence(filter SearchFilter, reason string) CrossChatRecallEvidence
DegradedCrossChatRecallEvidence reports that a caller asked for user scope but the diagnostic path could not inspect the session binding dependency.
func ExplainCrossChatRecall ¶
func ExplainCrossChatRecall(metas []SessionMetadata, filter SearchFilter) CrossChatRecallEvidence
ExplainCrossChatRecall returns evidence for a user-scoped widening decision.
type CrossChatSessionEvidence ¶
type CrossChatSessionEvidence struct {
SessionID string `json:"session_id"`
Source string `json:"source,omitempty"`
ChatID string `json:"chat_id,omitempty"`
ChatKey string `json:"chat_key,omitempty"`
Current bool `json:"current,omitempty"`
}
CrossChatSessionEvidence is the operator-readable identity for one session.
type CrossSessionKnowledge ¶
type CrossSessionKnowledge struct {
Query string
Memories []MemoryToolEntry
Sessions map[string]int
Summary string
}
type CrossSessionMemory ¶
type CrossSessionMemory struct {
// contains filtered or unexported fields
}
func NewCrossSessionMemory ¶
func NewCrossSessionMemory(store MemoryToolStore) *CrossSessionMemory
func (*CrossSessionMemory) DetectContradictions ¶
func (csm *CrossSessionMemory) DetectContradictions(ctx context.Context, newEntry MemoryToolEntry) ([]MemoryToolEntry, error)
func (*CrossSessionMemory) LoadRelevant ¶
func (csm *CrossSessionMemory) LoadRelevant(ctx context.Context, query string, limit int) ([]MemoryToolEntry, error)
func (*CrossSessionMemory) QueryKnowledge ¶
func (csm *CrossSessionMemory) QueryKnowledge(ctx context.Context, query string, limit int) (CrossSessionKnowledge, error)
type DialecticCaller ¶
type DialecticLevel ¶
type DialecticLevel string
const ( DialecticLevelMinimal DialecticLevel = "minimal" DialecticLevelLow DialecticLevel = "low" DialecticLevelMedium DialecticLevel = "medium" DialecticLevelHigh DialecticLevel = "high" DialecticLevelMax DialecticLevel = "max" )
type DiskUsageComponent ¶ added in v0.3.0
type DiskUsageDiagnostics ¶ added in v0.3.0
type DiskUsageDiagnostics struct {
DB DiskUsageComponent `json:"db"`
Images DiskUsageComponent `json:"images"`
Vectors DiskUsageComponent `json:"vectors"`
}
type DreamQueueStatus ¶
type DreamQueueStatus = dreamscheduler.DreamQueueStatus
type DreamScheduleParams ¶
type DreamScheduleParams = dreamscheduler.DreamScheduleParams
type DreamScheduleResult ¶
type DreamScheduleResult = dreamscheduler.DreamScheduleResult
type DreamStatusEvidence ¶
type DreamStatusEvidence = dreamscheduler.DreamStatusEvidence
type DriftAnchorCheckParams ¶
type DriftAnchorDetector ¶
type DriftAnchorDetector struct {
// contains filtered or unexported fields
}
func NewDriftAnchorDetector ¶
func NewDriftAnchorDetector(store MemoryToolStore) *DriftAnchorDetector
func (*DriftAnchorDetector) Check ¶
func (d *DriftAnchorDetector) Check(ctx context.Context, params DriftAnchorCheckParams) (DriftAnchorWarning, error)
type DriftAnchorWarning ¶
type DriftAnchorWarning struct {
Warn bool `json:"warn"`
Code string `json:"code,omitempty"`
MatchedMemoryID string `json:"matched_memory_id,omitempty"`
MatchedContent string `json:"matched_content,omitempty"`
SimilarityScore float64 `json:"similarity_score,omitempty"`
Recommendation string `json:"recommendation,omitempty"`
}
type EvalCandidateKind ¶ added in v0.3.0
type EvalCandidateKind string
const ( EvalCandidateQueryExpansionHint EvalCandidateKind = "query_expansion_hint" EvalCandidateGraphEdgeCandidate EvalCandidateKind = "graph_edge_candidate" EvalCandidateExtractionGap EvalCandidateKind = "extraction_gap" EvalCandidateStaleContradictoryMemory EvalCandidateKind = "stale_contradictory_memory" EvalCandidateScopeBug EvalCandidateKind = "scope_bug" )
type EvalCandidateList ¶ added in v0.3.0
type EvalCandidateList struct {
Candidates []EvalImprovementCandidate `json:"candidates"`
}
type EvalCandidateQuery ¶ added in v0.3.0
type EvalCandidateQuery struct {
WorkspaceID string `json:"workspace_id,omitempty"`
BenchmarkName string `json:"benchmark_name,omitempty"`
Status EvalCandidateStatus `json:"status,omitempty"`
Limit int `json:"limit,omitempty"`
}
type EvalCandidateStatus ¶ added in v0.3.0
type EvalCandidateStatus string
const EvalCandidateOpen EvalCandidateStatus = "open"
type EvalFailure ¶ added in v0.3.0
type EvalFailure struct {
QuestionID string `json:"question_id"`
Category string `json:"category,omitempty"`
Query string `json:"query"`
ExpectedMemoryIDs []string `json:"expected_memory_ids,omitempty"`
RetrievedMemoryIDs []string `json:"retrieved_memory_ids,omitempty"`
TopHitPreview string `json:"top_hit_preview,omitempty"`
FailureBucket string `json:"failure_bucket,omitempty"`
}
type EvalImprovementCandidate ¶ added in v0.3.0
type EvalImprovementCandidate struct {
ID string `json:"id"`
WorkspaceID string `json:"workspace_id"`
BenchmarkName string `json:"benchmark_name"`
RunID string `json:"run_id,omitempty"`
QuestionID string `json:"question_id"`
Kind EvalCandidateKind `json:"kind"`
Status EvalCandidateStatus `json:"status"`
Query string `json:"query"`
FailureBucket string `json:"failure_bucket,omitempty"`
Rationale string `json:"rationale"`
EvidenceIDs []string `json:"evidence_ids"`
ExpectedMemoryIDs []string `json:"expected_memory_ids,omitempty"`
RetrievedMemoryIDs []string `json:"retrieved_memory_ids,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type EvalRegistryInput ¶ added in v0.3.0
type EvalRegistryInput struct {
WorkspaceID string `json:"workspace_id,omitempty"`
BenchmarkName string `json:"benchmark_name"`
RunID string `json:"run_id,omitempty"`
Failures []EvalFailure `json:"failures"`
}
type EvalRegistryResult ¶ added in v0.3.0
type EvalRegistryResult struct {
WorkspaceID string `json:"workspace_id"`
BenchmarkName string `json:"benchmark_name"`
RunID string `json:"run_id,omitempty"`
Candidates []EvalImprovementCandidate `json:"candidates"`
}
type EvictionCandidate ¶ added in v0.3.0
type EvictionCandidate struct {
StableID string `json:"stable_id"`
TargetType string `json:"target_type"`
Action RetentionAction `json:"action"`
WorkspaceID string `json:"workspace_id"`
PeerID string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
CreatedAt time.Time `json:"created_at"`
Bytes int64 `json:"bytes,omitempty"`
Reasons []string `json:"reasons"`
Preview string `json:"preview,omitempty"`
}
type EvidenceItem ¶
type ExtractMemoryProposalsParams ¶ added in v0.3.0
type ExtractMemoryProposalsResult ¶ added in v0.3.0
type ExtractMemoryProposalsResult struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer_id"`
SessionKey string `json:"session_key"`
Window ProposalWindow `json:"window"`
Proposals []MemoryProposal `json:"proposals"`
ActiveMemoryWrites int `json:"active_memory_writes"`
}
type FileImportMetadata ¶
type FileImportMetadata = fileimport.Metadata
FileImportMetadata mirrors Honcho's file-related internal metadata attached to every message generated from an uploaded document.
type FileImportResult ¶
type FileImportResult struct {
WorkspaceID string `json:"workspace_id"`
SessionKey string `json:"session_key"`
PeerID string `json:"peer_id"`
FileID string `json:"file_id"`
Messages []ImportedFileMessage `json:"messages"`
}
FileImportResult describes the ordinary session messages written from an import plus degraded-mode evidence for reasoning work that cannot be queued.
type FilesystemWatcherCandidate ¶ added in v0.3.0
type FilesystemWatcherCandidate struct {
Path string `json:"path"`
RelativePath string `json:"relative_path"`
ChangeKind string `json:"change_kind"`
SizeBytes int64 `json:"size_bytes"`
Checksum string `json:"checksum"`
Content string `json:"content,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
type FilesystemWatcherImportParams ¶ added in v0.3.0
type FilesystemWatcherImportParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
PeerID string `json:"peer_id"`
SessionKey string `json:"session_key"`
RootDir string `json:"root_dir"`
Paths []string `json:"paths"`
IncludeGlobs []string `json:"include_globs"`
ExcludeGlobs []string `json:"exclude_globs,omitempty"`
ChangeKind string `json:"change_kind,omitempty"`
MaxPreviewBytes int `json:"max_preview_bytes,omitempty"`
AllowBinary bool `json:"allow_binary,omitempty"`
}
FilesystemWatcherImportParams describes a bounded batch of changed files from a local filesystem watcher. It intentionally requires explicit include globs so a connector cannot silently ingest an entire project tree.
type FilesystemWatcherImportResult ¶ added in v0.3.0
type FilesystemWatcherImportResult struct {
Mutates bool `json:"mutates"`
Preview FilesystemWatcherPreview `json:"preview"`
Observations []ObservationResult `json:"observations"`
ImportedCount int `json:"imported_count"`
ReplayedCount int `json:"replayed_count"`
Skipped []FilesystemWatcherSkipped `json:"skipped,omitempty"`
Candidates []FilesystemWatcherCandidate `json:"candidates,omitempty"`
}
type FilesystemWatcherPreview ¶ added in v0.3.0
type FilesystemWatcherPreview struct {
Mutates bool `json:"mutates"`
RootDir string `json:"root_dir"`
IncludeGlobs []string `json:"include_globs"`
ExcludeGlobs []string `json:"exclude_globs,omitempty"`
Candidates []FilesystemWatcherCandidate `json:"candidates"`
Skipped []FilesystemWatcherSkipped `json:"skipped"`
ImportableCount int `json:"importable_count"`
SkippedCount int `json:"skipped_count"`
}
type FilesystemWatcherSkipped ¶ added in v0.3.0
type ForgetMemoryTool ¶
type ForgetMemoryTool struct {
// contains filtered or unexported fields
}
func NewForgetMemoryTool ¶
func NewForgetMemoryTool(store MemoryToolStore) *ForgetMemoryTool
func (ForgetMemoryTool) Description ¶
func (t ForgetMemoryTool) Description() string
func (ForgetMemoryTool) Execute ¶
func (t ForgetMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (ForgetMemoryTool) Schema ¶
func (t ForgetMemoryTool) Schema() json.RawMessage
func (ForgetMemoryTool) Spec ¶
func (t ForgetMemoryTool) Spec() toolmeta.OperationSpec
type FourTierConsolidationResult ¶
type FourTierConsolidationResult struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
SessionKey string `json:"session_key"`
Items []ConsolidatedMemory `json:"items"`
}
type GonchoContextTool ¶
type GonchoContextTool struct {
// contains filtered or unexported fields
}
func NewGonchoContextTool ¶
func NewGonchoContextTool(svc *Service) *GonchoContextTool
func (*GonchoContextTool) Description ¶
func (t *GonchoContextTool) Description() string
func (*GonchoContextTool) Execute ¶
func (t *GonchoContextTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GonchoContextTool) Name ¶
func (t *GonchoContextTool) Name() string
func (*GonchoContextTool) Schema ¶
func (t *GonchoContextTool) Schema() json.RawMessage
func (*GonchoContextTool) Spec ¶
func (t *GonchoContextTool) Spec() toolmeta.OperationSpec
func (*GonchoContextTool) Timeout ¶
func (t *GonchoContextTool) Timeout() time.Duration
type GonchoHandoffTool ¶
type GonchoHandoffTool struct {
// contains filtered or unexported fields
}
func NewGonchoHandoffTool ¶
func NewGonchoHandoffTool(store MemoryToolStore) *GonchoHandoffTool
func (*GonchoHandoffTool) Description ¶
func (t *GonchoHandoffTool) Description() string
func (*GonchoHandoffTool) Execute ¶
func (t *GonchoHandoffTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GonchoHandoffTool) Name ¶
func (t *GonchoHandoffTool) Name() string
func (*GonchoHandoffTool) Schema ¶
func (t *GonchoHandoffTool) Schema() json.RawMessage
func (*GonchoHandoffTool) Spec ¶
func (t *GonchoHandoffTool) Spec() toolmeta.OperationSpec
func (*GonchoHandoffTool) Timeout ¶
func (t *GonchoHandoffTool) Timeout() time.Duration
type GonchoMarkdownStore ¶
type GonchoMarkdownStore struct {
// contains filtered or unexported fields
}
GonchoMarkdownStore is the markdown-backed memory store.
func NewGonchoMarkdownStore ¶
func NewGonchoMarkdownStore(db *sql.DB, cfg GonchoMarkdownStoreConfig) (*GonchoMarkdownStore, error)
NewGonchoMarkdownStore creates a new markdown-backed memory store.
type GonchoMarkdownStoreConfig ¶
GonchoMarkdownStoreConfig controls the markdown-backed memory store.
type GonchoMemoryV1Document ¶
type GonchoMemoryV1Document struct {
FormatVersion string `json:"format_version"`
ContractVersion string `json:"contract_version"`
Items []GonchoMemoryV1Item `json:"items"`
}
GonchoMemoryV1Item is a single memory entry in the V1 contract.
func ParseGonchoMemoryV1Markdown ¶
func ParseGonchoMemoryV1Markdown(raw string) (GonchoMemoryV1Document, error)
ParseGonchoMemoryV1Markdown parses markdown into V1 documents.
type GonchoMemoryV1Item ¶
type GonchoMemoryV1Item struct {
MemoryID string `json:"memory_id" yaml:"memory_id"`
Revision int `json:"revision" yaml:"revision"`
AgentID string `json:"agent_id" yaml:"agent_id"`
WorkspaceID string `json:"workspace_id" yaml:"workspace_id"`
PeerID string `json:"peer_id" yaml:"peer_id"`
SessionID string `json:"session_id" yaml:"session_id"`
Scope string `json:"scope" yaml:"scope"`
State string `json:"state" yaml:"state"`
SourceKind string `json:"source_kind" yaml:"source_kind"`
SourceTurnID string `json:"source_turn_id,omitempty" yaml:"source_turn_id,omitempty"`
TombstonedAt string `json:"tombstoned_at,omitempty" yaml:"tombstoned_at,omitempty"`
TombstoneReason string `json:"tombstone_reason,omitempty" yaml:"tombstone_reason,omitempty"`
Checksum string `json:"checksum" yaml:"checksum"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Importance float64 `json:"importance" yaml:"importance"`
CreatedAt string `json:"created_at" yaml:"created_at"`
UpdatedAt string `json:"updated_at" yaml:"updated_at"`
ProvenanceJSON string `json:"provenance_json,omitempty" yaml:"provenance_json,omitempty"`
Content string `json:"content" yaml:"-"`
}
type GonchoMemoryV1RecallRequest ¶
type GonchoMemoryV1RecallRequest struct {
WorkspaceID string
PeerID string
Query string
Limit int
Scope string
Sources []string
SessionID string
}
GonchoMemoryV1RecallRequest controls a V1 recall operation.
type GonchoMetaanalysisCoverageInput ¶
type GonchoMetaanalysisCoverageInput struct {
SourceDocumentPath string
SourceDocumentSHA256 string
ProofMatrix gonchoProofMatrixReport
ReviewLoopVerified bool
MemoryToolLoopVerified bool
LocalOnlyEvaluator string
DocsArchitectureKeywords []string
}
GonchoMetaanalysisCoverageInput binds the local proof evidence back to the architecture requirements documented in METAANALYSIS-MEMORY-SYSTEMS.md.
type GonchoMetaanalysisCoverageReport ¶
type GonchoMetaanalysisCoverageReport struct {
Service string `json:"service"`
CoverageVersion string `json:"coverage_version"`
SourceDocumentPath string `json:"source_document_path"`
SourceDocumentSHA256 string `json:"source_document_sha256"`
DocsArchitectureKeywords []string `json:"docs_architecture_keywords"`
PrinciplesCovered []string `json:"principles_covered"`
ContextLayersCovered []string `json:"context_layers_covered"`
LifecycleStatesCovered []string `json:"lifecycle_states_covered"`
CoreEvaluationsCovered []string `json:"core_evaluations_covered"`
PublicToolsVerified []string `json:"public_tools_verified"`
LocalFeaturesVerified []string `json:"local_features_verified"`
DeferredFeatures []string `json:"deferred_features"`
CompletionCondition string `json:"completion_condition"`
AllLocalEvaluatorChecksPassed bool `json:"all_local_evaluator_checks_passed"`
}
func BuildGonchoMetaanalysisCoverageReport ¶
func BuildGonchoMetaanalysisCoverageReport(input GonchoMetaanalysisCoverageInput) GonchoMetaanalysisCoverageReport
type GonchoPublicToolsRestartE2EReport ¶
type GonchoPublicToolsRestartE2EReport struct {
ToolNames []string `json:"tool_names"`
SQLiteRestartVerified bool `json:"sqlite_restart_verified"`
NetworkRequired bool `json:"network_required"`
OllamaRequired bool `json:"ollama_required"`
SearchCountBeforeRestart int `json:"search_count_before_restart"`
SearchCountAfterRestart int `json:"search_count_after_restart"`
RecallSelectedAfterRestart int `json:"recall_selected_after_restart"`
ContextRepresentationAfterRestart string `json:"context_representation_after_restart"`
ReviewWarningBeforeResolve bool `json:"review_warning_before_resolve"`
ReviewWarningAfterResolve bool `json:"review_warning_after_resolve"`
HandoffCountAfterRestart int `json:"handoff_count_after_restart"`
CompletionCondition string `json:"completion_condition"`
}
func RunGonchoPublicToolsRestartE2E ¶
func RunGonchoPublicToolsRestartE2E(ctx context.Context, cfg GonchoPublicToolsRestartE2EConfig) (GonchoPublicToolsRestartE2EReport, error)
type GonchoRecallTool ¶
type GonchoRecallTool struct {
// contains filtered or unexported fields
}
func NewGonchoRecallTool ¶
func NewGonchoRecallTool(svc *Service) *GonchoRecallTool
func (*GonchoRecallTool) Description ¶
func (t *GonchoRecallTool) Description() string
func (*GonchoRecallTool) Execute ¶
func (t *GonchoRecallTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GonchoRecallTool) Name ¶
func (t *GonchoRecallTool) Name() string
func (*GonchoRecallTool) Schema ¶
func (t *GonchoRecallTool) Schema() json.RawMessage
func (*GonchoRecallTool) Spec ¶
func (t *GonchoRecallTool) Spec() toolmeta.OperationSpec
func (*GonchoRecallTool) Timeout ¶
func (t *GonchoRecallTool) Timeout() time.Duration
type GonchoRememberTool ¶
type GonchoRememberTool struct {
// contains filtered or unexported fields
}
func NewGonchoRememberTool ¶
func NewGonchoRememberTool(svc *Service) *GonchoRememberTool
func (*GonchoRememberTool) Description ¶
func (t *GonchoRememberTool) Description() string
func (*GonchoRememberTool) Execute ¶
func (t *GonchoRememberTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GonchoRememberTool) Name ¶
func (t *GonchoRememberTool) Name() string
func (*GonchoRememberTool) Schema ¶
func (t *GonchoRememberTool) Schema() json.RawMessage
func (*GonchoRememberTool) Spec ¶
func (t *GonchoRememberTool) Spec() toolmeta.OperationSpec
func (*GonchoRememberTool) Timeout ¶
func (t *GonchoRememberTool) Timeout() time.Duration
type GonchoSearchTool ¶
type GonchoSearchTool struct {
// contains filtered or unexported fields
}
func NewGonchoSearchTool ¶
func NewGonchoSearchTool(svc *Service) *GonchoSearchTool
func (*GonchoSearchTool) Description ¶
func (t *GonchoSearchTool) Description() string
func (*GonchoSearchTool) Execute ¶
func (t *GonchoSearchTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GonchoSearchTool) Name ¶
func (t *GonchoSearchTool) Name() string
func (*GonchoSearchTool) Schema ¶
func (t *GonchoSearchTool) Schema() json.RawMessage
func (*GonchoSearchTool) Spec ¶
func (t *GonchoSearchTool) Spec() toolmeta.OperationSpec
func (*GonchoSearchTool) Timeout ¶
func (t *GonchoSearchTool) Timeout() time.Duration
type GraphExpansionIndex ¶
type GraphExpansionIndex struct {
Memories map[string]RecallCandidate
Relations []GraphRelation
}
type GraphRelation ¶
type HonchoSDKCompatibilityHarness ¶
type HonchoSDKCompatibilityHarness struct {
// contains filtered or unexported fields
}
HonchoSDKCompatibilityHarness is a hermetic adapter for proving Honcho SDK request/response flows against the local Goncho service.
func NewHonchoSDKCompatibilityHarness ¶
func NewHonchoSDKCompatibilityHarness(service *Service) *HonchoSDKCompatibilityHarness
func (*HonchoSDKCompatibilityHarness) ContextPreview ¶
func (h *HonchoSDKCompatibilityHarness) ContextPreview(ctx context.Context, req HonchoSDKContextPreviewRequest) (HonchoSDKContextPreview, error)
func (*HonchoSDKCompatibilityHarness) Search ¶
func (h *HonchoSDKCompatibilityHarness) Search(ctx context.Context, req HonchoSDKSearchRequest) (HonchoSDKSearchResponse, error)
func (*HonchoSDKCompatibilityHarness) SeedSession ¶
func (h *HonchoSDKCompatibilityHarness) SeedSession(ctx context.Context, seed HonchoSDKSessionSeed) (HonchoSDKSeedResult, error)
type HonchoSDKConclusion ¶
type HonchoSDKContextPreview ¶
type HonchoSDKContextPreview struct {
WorkspaceID string `json:"workspace_id"`
PeerID string `json:"peer_id"`
SessionID string `json:"session_id,omitempty"`
PeerCard []string `json:"peer_card"`
Representation string `json:"representation"`
Summary *HonchoSDKContextSummary `json:"summary,omitempty"`
SearchResults []HonchoSDKSearchHit `json:"search_results,omitempty"`
RecentMessages []MessageSlice `json:"recent_messages,omitempty"`
Unsupported []HonchoSDKUnsupportedFlow `json:"unsupported,omitempty"`
}
type HonchoSDKContextSummary ¶
type HonchoSDKMessage ¶
type HonchoSDKMessage struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
SessionID string `json:"session_id"`
PeerID string `json:"peer_id"`
Role string `json:"role"`
Content string `json:"content"`
Sequence int `json:"seq_in_session"`
CreatedAt int64 `json:"created_at"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type HonchoSDKMessageInput ¶
type HonchoSDKPeer ¶
type HonchoSDKPeer struct {
ID string `json:"id"`
}
type HonchoSDKSearchHit ¶
type HonchoSDKSearchRequest ¶
type HonchoSDKSearchResponse ¶
type HonchoSDKSearchResponse struct {
WorkspaceID string `json:"workspace_id"`
PeerID string `json:"peer_id"`
Query string `json:"query"`
Results []HonchoSDKSearchHit `json:"results"`
}
type HonchoSDKSeedResult ¶
type HonchoSDKSeedResult struct {
Workspace HonchoSDKWorkspace `json:"workspace"`
Peer HonchoSDKPeer `json:"peer"`
Session HonchoSDKSession `json:"session"`
Messages []HonchoSDKMessage `json:"messages"`
Conclusions []HonchoSDKConclusion `json:"conclusions,omitempty"`
}
type HonchoSDKSession ¶
type HonchoSDKSession struct {
ID string `json:"id"`
}
type HonchoSDKSessionSeed ¶
type HonchoSDKSessionSeed struct {
PeerID string
SessionID string
PeerCard []string
Conclusions []string
Messages []HonchoSDKMessageInput
}
type HonchoSDKUnsupportedFlow ¶
type HonchoSDKUnsupportedFlow struct {
Code string `json:"code"`
Method string `json:"method"`
Endpoint string `json:"endpoint"`
Fields []string `json:"fields"`
}
func UnsupportedHonchoSDKFlow ¶
func UnsupportedHonchoSDKFlow(method, endpoint string, fields ...string) HonchoSDKUnsupportedFlow
type HonchoSDKWorkspace ¶
type HonchoSDKWorkspace struct {
ID string `json:"id"`
}
type HookCaptureResult ¶
type HookCaptureResult struct {
Observations []Observation `json:"observations"`
Messages []MessageRecord `json:"messages"`
Summary *SessionSummary `json:"summary,omitempty"`
}
HookCaptureResult reports every durable write performed for a host hook.
type HostHookEvent ¶
type HostHookEvent struct {
Event HostHookEventName `json:"event"`
Host string `json:"host,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
PeerID string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
ContextID string `json:"context_id,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Content string `json:"content,omitempty"`
Input string `json:"input,omitempty"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Summary string `json:"summary,omitempty"`
Success *bool `json:"success,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
ObservedAt time.Time `json:"observed_at,omitempty"`
}
HostHookEvent is the host-neutral automatic capture envelope. It is designed to be small enough for hook scripts and rich enough to route to Observe, CreateMessages, and session-summary persistence without importing a host SDK.
type HostHookEventName ¶
type HostHookEventName string
HostHookEventName is a host-neutral lifecycle/tool event name accepted by CaptureHostHook. Host adapters translate Claude Code, Pi, MCP, or other runtime-specific hooks into this shape before handing them to Goncho.
const ( HostHookSessionStart HostHookEventName = "session_start" HostHookPrompt HostHookEventName = "prompt" HostHookUserPrompt HostHookEventName = "user_prompt" HostHookPreToolUse HostHookEventName = "pre_tool_use" HostHookPostToolUse HostHookEventName = "post_tool_use" HostHookToolFailure HostHookEventName = "tool_failure" HostHookAssistantResponse HostHookEventName = "assistant_response" HostHookCompaction HostHookEventName = "compaction" HostHookCompact HostHookEventName = "compact" HostHookSubagentStart HostHookEventName = "subagent_start" HostHookSubagentStop HostHookEventName = "subagent_stop" HostHookStop HostHookEventName = "stop" HostHookSessionEnd HostHookEventName = "session_end" HostHookFailure HostHookEventName = "failure" )
type HostHookEventSchema ¶ added in v0.3.0
type HostHookEventSchema struct {
Event HostHookEventName `json:"event"`
Description string `json:"description"`
RequiredFields []string `json:"required_fields"`
JSONSchema map[string]any `json:"json_schema"`
}
HostHookEventSchema documents the host-neutral JSON event contract adapters should emit before calling CaptureHostHook.
func HostHookEventSchemas ¶ added in v0.3.0
func HostHookEventSchemas() []HostHookEventSchema
HostHookEventSchemas returns the P1 automatic-capture lifecycle event catalog.
type ImageEmbeddingStatus ¶
type ImageEmbeddingStatus string
const ImageEmbeddingDeferred ImageEmbeddingStatus = "deferred"
type ImageMemory ¶
type ImageMemory struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
SessionKey string `json:"session_key,omitempty"`
ImageRef string `json:"image_ref"`
Checksum string `json:"checksum"`
AltText string `json:"alt_text,omitempty"`
EmbeddingStatus ImageEmbeddingStatus `json:"embedding_status"`
Metadata map[string]string `json:"metadata,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
Replayed bool `json:"replayed,omitempty"`
}
type ImageMemoryList ¶
type ImageMemoryList struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Images []ImageMemory `json:"images"`
}
type ImageMemoryParams ¶
type ImageMemoryParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
SessionKey string `json:"session_key,omitempty"`
ImageRef string `json:"image_ref"`
Checksum string `json:"checksum"`
AltText string `json:"alt_text,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type ImageMemoryQuery ¶
type ImportFileParams ¶
type ImportFileParams = fileimport.Params
ImportFileParams is the local Goncho equivalent of Honcho's multipart file upload request body. Content is consumed in memory and is not persisted as original file bytes.
type ImportanceScorer ¶
type ImportanceScorer struct {
// contains filtered or unexported fields
}
func NewImportanceScorer ¶
func NewImportanceScorer() *ImportanceScorer
func (*ImportanceScorer) EffectiveImportance ¶
func (s *ImportanceScorer) EffectiveImportance(entry MemoryToolEntry, now time.Time) float64
func (*ImportanceScorer) Rank ¶
func (s *ImportanceScorer) Rank(entries []MemoryToolEntry, relevanceByID map[string]float64, now time.Time) []ScoredMemory
func (*ImportanceScorer) RankByQuery ¶
func (s *ImportanceScorer) RankByQuery(entries []MemoryToolEntry, query string, now time.Time) []ScoredMemory
func (*ImportanceScorer) ReviewRetentionCandidates ¶
func (s *ImportanceScorer) ReviewRetentionCandidates(entries []MemoryToolEntry, policy RetentionPolicy) []RetentionCandidate
func (*ImportanceScorer) Score ¶
func (s *ImportanceScorer) Score(entry MemoryToolEntry, relevanceScore float64, now time.Time) float64
type ImportedFileMessage ¶
type ImportedFileMessage = fileimport.Message
ImportedFileMessage is the stable return shape for each imported chunk.
type LocalMarkdownMemoryConfig ¶
type LocalMarkdownMemoryConfig = localmarkdown.Config
LocalMarkdownMemoryConfig wires the local-first Goncho V1 memory tools to a SQLite database and a Markdown export file.
type LocalMarkdownMemoryStatus ¶
type LocalMarkdownMemoryStatus = localmarkdown.Status
LocalMarkdownMemoryStatus is the operator-facing status for the local memory backend used by Memory V1 MCP tools.
type LocalMarkdownMemoryStore ¶
type LocalMarkdownMemoryStore struct {
// contains filtered or unexported fields
}
LocalMarkdownMemoryStore persists tool memories into the Goncho V1 SQLite table and mirrors the table to a human-editable Markdown file.
func NewLocalMarkdownMemoryStore ¶
func NewLocalMarkdownMemoryStore(db *sql.DB, cfg LocalMarkdownMemoryConfig) *LocalMarkdownMemoryStore
func (*LocalMarkdownMemoryStore) Forget ¶
func (s *LocalMarkdownMemoryStore) Forget(ctx context.Context, id string) error
func (*LocalMarkdownMemoryStore) Retrieve ¶
func (s *LocalMarkdownMemoryStore) Retrieve(ctx context.Context, query string, limit int) ([]MemoryToolEntry, error)
func (*LocalMarkdownMemoryStore) Status ¶
func (s *LocalMarkdownMemoryStore) Status(ctx context.Context) (LocalMarkdownMemoryStatus, error)
func (*LocalMarkdownMemoryStore) Store ¶
func (s *LocalMarkdownMemoryStore) Store(ctx context.Context, entry MemoryToolEntry) error
func (*LocalMarkdownMemoryStore) UpdateImportance ¶
type LocalVectorIndex ¶ added in v0.3.0
type LocalVectorIndex struct {
// contains filtered or unexported fields
}
func NewLocalVectorIndex ¶ added in v0.3.0
func NewLocalVectorIndex(ctx context.Context, opts LocalVectorIndexOptions) (*LocalVectorIndex, error)
func (*LocalVectorIndex) Diagnostics ¶ added in v0.3.0
func (i *LocalVectorIndex) Diagnostics(ctx context.Context) (LocalVectorIndexDiagnostics, error)
func (*LocalVectorIndex) Search ¶ added in v0.3.0
func (i *LocalVectorIndex) Search(ctx context.Context, query VectorSearchQuery) ([]VectorSearchHit, error)
func (*LocalVectorIndex) Upsert ¶ added in v0.3.0
func (i *LocalVectorIndex) Upsert(ctx context.Context, memory LocalVectorMemory) error
type LocalVectorIndexDiagnostics ¶ added in v0.3.0
type LocalVectorIndexOptions ¶ added in v0.3.0
type LocalVectorIndexOptions struct {
Path string
Provider TextEmbeddingProvider
}
type LocalVectorMemory ¶ added in v0.3.0
type LocalVectorMemory struct {
MemoryID string `json:"memory_id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
SourceType string `json:"source_type,omitempty"`
Content string `json:"content"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Importance float64 `json:"importance,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type MemoryAddParams ¶ added in v0.3.0
type MemoryAddParams struct {
ID string `json:"id"`
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Content string `json:"content"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type MemoryConsolidationTier ¶
type MemoryConsolidationTier string
const ( ConsolidationTierWorking MemoryConsolidationTier = "working" ConsolidationTierEpisodic MemoryConsolidationTier = "episodic" ConsolidationTierSemantic MemoryConsolidationTier = "semantic" ConsolidationTierProcedural MemoryConsolidationTier = "procedural" )
type MemoryContradiction ¶
type MemoryContradiction struct {
Existing MemoryToolEntry
Incoming MemoryToolEntry
Subject string
Relation string
Reason string
}
func DetectMemoryContradiction ¶
func DetectMemoryContradiction(existing, incoming MemoryToolEntry) (MemoryContradiction, bool)
type MemoryDeleteParams ¶ added in v0.3.0
type MemoryDeleteParams struct {
ID string `json:"id"`
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
}
type MemoryFacade ¶ added in v0.3.0
type MemoryFacade struct {
// contains filtered or unexported fields
}
MemoryFacade is a mem0-style tiny API over Goncho's evidence-backed service APIs. It keeps caller-supplied IDs stable by storing each memory as a named memory slot, and records add/update/delete history as observations.
func NewMemoryFacade ¶ added in v0.3.0
func NewMemoryFacade(svc *Service) *MemoryFacade
func (*MemoryFacade) Add ¶ added in v0.3.0
func (f *MemoryFacade) Add(ctx context.Context, p MemoryAddParams) (MemoryItem, error)
func (*MemoryFacade) Delete ¶ added in v0.3.0
func (f *MemoryFacade) Delete(ctx context.Context, p MemoryDeleteParams) (MemoryItem, error)
func (*MemoryFacade) Get ¶ added in v0.3.0
func (f *MemoryFacade) Get(ctx context.Context, p MemoryGetParams) (MemoryItem, error)
func (*MemoryFacade) History ¶ added in v0.3.0
func (f *MemoryFacade) History(ctx context.Context, p MemoryHistoryParams) (MemoryHistoryResult, error)
func (*MemoryFacade) Search ¶ added in v0.3.0
func (f *MemoryFacade) Search(ctx context.Context, p MemorySearchParams) (MemorySearchResult, error)
func (*MemoryFacade) Update ¶ added in v0.3.0
func (f *MemoryFacade) Update(ctx context.Context, p MemoryUpdateParams) (MemoryItem, error)
type MemoryGetParams ¶ added in v0.3.0
type MemoryHistoryEvent ¶ added in v0.3.0
type MemoryHistoryEvent struct {
EvidenceID string `json:"evidence_id"`
Action string `json:"action"`
MemoryID string `json:"memory_id"`
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
PreviousContent string `json:"previous_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
ObservedAt time.Time `json:"observed_at"`
}
type MemoryHistoryParams ¶ added in v0.3.0
type MemoryHistoryResult ¶ added in v0.3.0
type MemoryHistoryResult struct {
ID string `json:"id"`
Events []MemoryHistoryEvent `json:"events"`
Count int `json:"count"`
}
type MemoryImportanceUpdater ¶
type MemoryItem ¶ added in v0.3.0
type MemoryItem struct {
ID string `json:"id"`
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Content string `json:"content"`
Metadata map[string]string `json:"metadata,omitempty"`
Revision int `json:"revision"`
Deleted bool `json:"deleted,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
}
type MemoryNamespace ¶
type MemoryProposal ¶ added in v0.3.0
type MemoryProposal struct {
ID string `json:"id"`
Operation MemoryProposalOperation `json:"operation"`
Status MemoryProposalStatus `json:"status"`
Kind MemoryProposalKind `json:"kind"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer_id"`
SessionKey string `json:"session_key"`
Scope string `json:"scope"`
Subject string `json:"subject,omitempty"`
Content string `json:"content,omitempty"`
Confidence float64 `json:"confidence"`
ExpiryHint string `json:"expiry_hint,omitempty"`
EvidenceIDs []string `json:"evidence_ids"`
RelatedIDs []string `json:"related_ids,omitempty"`
ReviewItemID string `json:"review_item_id,omitempty"`
ReviewReason string `json:"review_reason,omitempty"`
}
type MemoryProposalKind ¶ added in v0.3.0
type MemoryProposalKind string
const ( MemoryProposalFact MemoryProposalKind = "fact" MemoryProposalPreference MemoryProposalKind = "preference" MemoryProposalProcedure MemoryProposalKind = "procedure" )
type MemoryProposalOperation ¶ added in v0.3.0
type MemoryProposalOperation string
const ( MemoryProposalAdd MemoryProposalOperation = "add" MemoryProposalUpdate MemoryProposalOperation = "update" MemoryProposalSupersede MemoryProposalOperation = "supersede" MemoryProposalDelete MemoryProposalOperation = "delete" MemoryProposalNoop MemoryProposalOperation = "noop" )
type MemoryProposalStatus ¶ added in v0.3.0
type MemoryProposalStatus string
const ( MemoryProposalReady MemoryProposalStatus = "ready" MemoryProposalReviewRequired MemoryProposalStatus = "review_required" )
type MemoryResourceContent ¶
type MemoryResourceDescriptor ¶
type MemoryResourceDescriptor struct {
URI string `json:"uri"`
Name string `json:"name"`
Kind MemoryResourceKind `json:"kind"`
Description string `json:"description"`
MimeType string `json:"mime_type"`
}
type MemoryResourceKind ¶
type MemoryResourceKind string
const ( MemoryResourceKindResource MemoryResourceKind = "resource" MemoryResourceKindPrompt MemoryResourceKind = "prompt" )
type MemoryResourceRegistry ¶
type MemoryResourceRegistry struct {
// contains filtered or unexported fields
}
func NewMemoryResourceRegistry ¶
func NewMemoryResourceRegistry(svc *Service) *MemoryResourceRegistry
func (*MemoryResourceRegistry) Descriptors ¶
func (r *MemoryResourceRegistry) Descriptors() []MemoryResourceDescriptor
func (*MemoryResourceRegistry) Read ¶
func (r *MemoryResourceRegistry) Read(ctx context.Context, req MemoryResourceRequest) (MemoryResourceContent, error)
type MemoryResourceRequest ¶
type MemoryResourceRequest struct {
URI string `json:"uri"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer,omitempty"`
Query string `json:"query,omitempty"`
SessionKey string `json:"session_key,omitempty"`
Scope string `json:"scope,omitempty"`
Limit int `json:"limit,omitempty"`
}
type MemorySearchParams ¶ added in v0.3.0
type MemorySearchParams struct {
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Query string `json:"query,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Limit int `json:"limit,omitempty"`
}
type MemorySearchResult ¶ added in v0.3.0
type MemorySearchResult struct {
Items []MemoryItem `json:"items"`
Count int `json:"count"`
}
type MemorySlot ¶
type MemorySlot struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Scope string `json:"scope"`
Name string `json:"name"`
Kind string `json:"kind"`
Value string `json:"value"`
Revision int `json:"revision"`
Deleted bool `json:"deleted,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type MemorySlotList ¶
type MemorySlotList struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Scope string `json:"scope"`
Slots []MemorySlot `json:"slots"`
}
type MemorySlotParams ¶
type MemorySlotQuery ¶
type MemoryToolEntry ¶
type MemoryToolEntry struct {
ID string `json:"id"`
Content string `json:"content"`
Tags []string `json:"tags"`
Importance float64 `json:"importance"`
SessionID string `json:"session_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Metadata map[string]string `json:"metadata,omitempty"`
}
MemoryToolEntry is a single unit of agent-managed memory.
func RecentEntries ¶
func RecentEntries(entries []MemoryToolEntry, now time.Time, maxAge time.Duration) []MemoryToolEntry
type MemoryToolStore ¶
type MemoryToolStore interface {
Store(ctx context.Context, entry MemoryToolEntry) error
Retrieve(ctx context.Context, query string, limit int) ([]MemoryToolEntry, error)
Update(ctx context.Context, id string, content string) error
Forget(ctx context.Context, id string) error
}
MemoryToolStore abstracts the storage backend for agent-controlled memory tool calls.
type MemoryUpdateParams ¶ added in v0.3.0
type MemoryUpdateParams struct {
ID string `json:"id"`
UserID string `json:"user_id"`
AgentID string `json:"agent_id,omitempty"`
RunID string `json:"run_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Content string `json:"content"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type MemoryV1ToolContractInfo ¶
type MemoryV1ToolContractInfo struct {
ContractVersion string `json:"contract_version"`
PrivateAgentMemoryDefault bool `json:"private_agent_memory_default"`
SelfImprovementPerAgentDefault bool `json:"self_improvement_per_agent_default"`
PurgePolicy string `json:"purge_policy"`
Tools map[string]MemoryV1ToolSpec `json:"tools"`
}
func MemoryV1ToolContract ¶
func MemoryV1ToolContract() MemoryV1ToolContractInfo
type MemoryV1ToolSpec ¶
type MemoryV1ToolSpec struct {
Name string `json:"name"`
Mutating bool `json:"mutating"`
Idempotent bool `json:"idempotent"`
RequiresStableID bool `json:"requires_stable_id"`
RequiresProvenance bool `json:"requires_provenance"`
CreatesRevision bool `json:"creates_revision"`
DeleteSemantics string `json:"delete_semantics,omitempty"`
ResultContractVersion string `json:"result_contract_version"`
}
type MemoryV1ToolTranscriptEntry ¶
type MemoryV1ToolTranscriptEntry struct {
Tool string `json:"tool"`
Arguments map[string]any `json:"arguments"`
Result map[string]any `json:"result"`
}
func DecodeMemoryV1ToolTranscript ¶
func DecodeMemoryV1ToolTranscript(body []byte) ([]MemoryV1ToolTranscriptEntry, error)
type Message ¶
Message is a goncho-owned chat message type used by session summary extraction. It replaces hermes.Message to enable standalone extraction.
type MessageRecord ¶
type MessageRecord struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
SessionKey string `json:"session_key"`
Peer string `json:"peer_id"`
Role string `json:"role"`
Content string `json:"content"`
Sequence int `json:"seq_in_session"`
CreatedAt int64 `json:"created_at"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type MessageSearchHit ¶
type MessageSearchHit struct {
SessionID string
ChatID string
Source string
Role string
Content string
TSUnix int64
Lineage SearchLineage
}
MessageSearchHit is one turn-level result from the session catalog.
func SearchMessages ¶
func SearchMessages(ctx context.Context, db *sql.DB, metas []SessionMetadata, filter SearchFilter, limit int) ([]MessageSearchHit, error)
SearchMessages returns matching turns across the canonical sessions bound to one user, optionally narrowed to a subset of sources.
type MessageSlice ¶
MessageSlice is one recent message excerpt included in context responses.
type Observation ¶
type Observation = observationlog.Observation
type ObservationDecision ¶
func DefaultObservation ¶
func DefaultObservation(req ObservationRequest) ObservationDecision
type ObservationKind ¶
type ObservationKind = observationlog.ObservationKind
const ( ObservationKindSessionStart ObservationKind = observationlog.ObservationKindSessionStart ObservationKindUserPrompt ObservationKind = observationlog.ObservationKindUserPrompt ObservationKindToolCall ObservationKind = observationlog.ObservationKindToolCall ObservationKindToolResult ObservationKind = observationlog.ObservationKindToolResult ObservationKindToolError ObservationKind = observationlog.ObservationKindToolError ObservationKindAssistantResponse ObservationKind = observationlog.ObservationKindAssistantResponse ObservationKindCompact ObservationKind = observationlog.ObservationKindCompact ObservationKindSessionEnd ObservationKind = observationlog.ObservationKindSessionEnd ObservationKindCustom ObservationKind = observationlog.ObservationKindCustom )
type ObservationList ¶
type ObservationList = observationlog.ObservationList
func ListObservations ¶
func ListObservations(ctx context.Context, db *sql.DB, q ObservationQuery) (ObservationList, error)
type ObservationParams ¶
type ObservationParams = observationlog.ObservationParams
type ObservationQuery ¶
type ObservationQuery = observationlog.ObservationQuery
type ObservationRequest ¶
type ObservationResult ¶
type ObservationResult = observationlog.ObservationResult
func Observe ¶
func Observe(ctx context.Context, db *sql.DB, p ObservationParams) (ObservationResult, error)
type PeerIdentityDecision ¶
func ResolvePeerID ¶
func ResolvePeerID(meta SessionMetadata) (PeerIdentityDecision, error)
type PeerRole ¶
type PeerRole string
const ( PeerRoleHuman PeerRole = "human" PeerRoleGormesAssistant PeerRole = "gormes_assistant" PeerRoleDeterministicAssistant PeerRole = "deterministic_assistant" PeerRoleTransportBot PeerRole = "transport_bot" PeerRoleImportHelper PeerRole = "import_helper" PeerRoleParentAgent PeerRole = "parent_agent" )
type PortableExportManifest ¶ added in v0.3.0
type PortableExportManifest struct {
SchemaVersion string `json:"schema_version"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
RedactionPolicy string `json:"redaction_policy,omitempty"`
Counts map[string]int `json:"counts"`
Checksum string `json:"checksum"`
}
type PortableExportParams ¶ added in v0.3.0
type PortableExportParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
Since time.Time `json:"since,omitempty"`
Until time.Time `json:"until,omitempty"`
RedactionPolicy string `json:"redaction_policy,omitempty"`
IncludeSnapshots bool `json:"include_snapshots,omitempty"`
}
type PortableExportRecord ¶ added in v0.3.0
type PortableExportRecord struct {
Type string `json:"type"`
StableID string `json:"stable_id"`
Data json.RawMessage `json:"data"`
}
type PortableExportResult ¶ added in v0.3.0
type PortableExportResult struct {
Manifest PortableExportManifest `json:"manifest"`
JSONL []byte `json:"-"`
}
type PortableImportConflict ¶ added in v0.3.0
type PortableImportParams ¶ added in v0.3.0
type PortableImportPreview ¶ added in v0.3.0
type PortableImportPreview struct {
SchemaVersion string `json:"schema_version"`
ManifestChecksum string `json:"manifest_checksum"`
Mutates bool `json:"mutates"`
SafeToApply bool `json:"safe_to_apply"`
Counts map[string]int `json:"counts"`
Conflicts []PortableImportConflict `json:"conflicts,omitempty"`
Redaction PortableRedactionSummary `json:"redaction"`
}
type PortableImportResult ¶ added in v0.3.0
type PortableRedactionSummary ¶ added in v0.3.0
type ProfileHint ¶
type ProfileHint struct {
Code string `json:"code"`
Message string `json:"message"`
Alternatives []string `json:"alternatives"`
}
ProfileHint gives honcho_profile callers actionable guidance when an empty peer card is a valid non-error state.
type ProfileResult ¶
type ProfileResult struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Target string `json:"target,omitempty"`
ObserverPeerID string `json:"observer_peer_id,omitempty"`
ObservedPeerID string `json:"observed_peer_id,omitempty"`
Card []string `json:"card"`
Result string `json:"result,omitempty"`
Hint *ProfileHint `json:"hint,omitempty"`
}
ProfileResult is the external shape used by profile reads and updates.
type ProposalWindow ¶ added in v0.3.0
type ProviderCircuitBreaker ¶ added in v0.3.0
type ProviderCircuitBreaker struct {
// contains filtered or unexported fields
}
func NewProviderCircuitBreaker ¶ added in v0.3.0
func NewProviderCircuitBreaker(cfg ProviderCircuitBreakerConfig) *ProviderCircuitBreaker
func (*ProviderCircuitBreaker) Health ¶ added in v0.3.0
func (b *ProviderCircuitBreaker) Health() ProviderHealth
type ProviderCircuitBreakerConfig ¶ added in v0.3.0
type ProviderCircuitState ¶ added in v0.3.0
type ProviderCircuitState string
const ( ProviderCircuitClosed ProviderCircuitState = "closed" ProviderCircuitOpen ProviderCircuitState = "open" ProviderCircuitHalfOpen ProviderCircuitState = "half_open" )
type ProviderHealth ¶ added in v0.3.0
type ProviderHealth struct {
Name string `json:"name"`
Kind ProviderKind `json:"kind"`
Status ProviderStatus `json:"status"`
CircuitState ProviderCircuitState `json:"circuit_state"`
Optional bool `json:"optional"`
LastError string `json:"last_error,omitempty"`
FailureCount int `json:"failure_count,omitempty"`
RetryAfter time.Time `json:"retry_after,omitempty"`
TimeoutMillis int64 `json:"timeout_ms,omitempty"`
MaxPayloadBytes int `json:"max_payload_bytes,omitempty"`
}
type ProviderHealthDiagnostics ¶ added in v0.3.0
type ProviderHealthDiagnostics []ProviderHealth
func (ProviderHealthDiagnostics) ByName ¶ added in v0.3.0
func (d ProviderHealthDiagnostics) ByName(name string) ProviderHealth
type ProviderHealthRegistry ¶ added in v0.3.0
type ProviderHealthRegistry struct {
// contains filtered or unexported fields
}
func NewProviderHealthRegistry ¶ added in v0.3.0
func NewProviderHealthRegistry(cfg ProviderResilienceConfig, vectorStore VectorStore) *ProviderHealthRegistry
func (*ProviderHealthRegistry) Diagnostics ¶ added in v0.3.0
func (r *ProviderHealthRegistry) Diagnostics() ProviderHealthDiagnostics
func (*ProviderHealthRegistry) MaxPayloadBytes ¶ added in v0.3.0
func (r *ProviderHealthRegistry) MaxPayloadBytes(name string) int
type ProviderKind ¶ added in v0.3.0
type ProviderKind string
const ( ProviderKindExtraction ProviderKind = "extraction" ProviderKindEmbedding ProviderKind = "embedding" ProviderKindReranking ProviderKind = "reranking" ProviderKindSummarization ProviderKind = "summarization" )
type ProviderResilienceConfig ¶ added in v0.3.0
type ProviderStatus ¶ added in v0.3.0
type ProviderStatus string
const ( ProviderStatusHealthy ProviderStatus = "healthy" ProviderStatusDegraded ProviderStatus = "degraded" ProviderStatusDisabled ProviderStatus = "disabled" )
type QueueEmptyWebhookEventParams ¶
type QueueEmptyWebhookEventParams = webhookspkg.QueueEmptyWebhookEventParams
type QueueStatus ¶
type QueueStatus = queuestatus.Status
QueueStatus is the local Goncho queue status read model. Until a dedicated Goncho task queue exists, it reports deterministic zero-state counts with degraded evidence.
func ReadQueueStatus ¶
func ReadQueueStatus(ctx context.Context, db *sql.DB, cfgs ...QueueStatusConfig) (QueueStatus, error)
ReadQueueStatus returns a deterministic local read model. It never waits for the queue to drain; dream rows are auditable work intent, not worker output.
func ZeroQueueStatus ¶
func ZeroQueueStatus() QueueStatus
ZeroQueueStatus reports that no dedicated Goncho task queue exists yet while preserving Honcho-compatible work-unit fields.
type QueueStatusConfig ¶
type QueueStatusConfig = dreamscheduler.QueueStatusConfig
type QueueWorkUnitStatus ¶
type QueueWorkUnitStatus = queuestatus.WorkUnitStatus
QueueWorkUnitStatus mirrors Honcho's queue status count shape.
type RecallBenchmarkAbilityReport ¶
type RecallBenchmarkAbilityReport struct {
Ability string `json:"ability"`
CaseCount int `json:"case_count"`
RecallAt5 float64 `json:"recall_at_5"`
RecallAt10 float64 `json:"recall_at_10"`
ContextHitRate float64 `json:"context_hit_rate"`
TokenBudgetPassRate float64 `json:"token_budget_pass_rate"`
ProvenanceHitRate float64 `json:"provenance_hit_rate"`
}
type RecallBenchmarkCase ¶
type RecallBenchmarkCase struct {
ID string
Ability string
Scale string
ConversationID string
IdealAnswer string
Rubric []string
Trace RecallTrace
RelevantIDs []string
ContextContains []string
RequiredEvidenceKinds []string
ExpectedNoAnswer bool
Latency time.Duration
}
RecallBenchmarkCase is one hermetic retrieval-evaluation case. It consumes an already-produced RecallTrace; it never runs retrieval or opens storage.
type RecallBenchmarkCaseReport ¶
type RecallBenchmarkCaseReport struct {
ID string `json:"id"`
Ability string `json:"ability,omitempty"`
Scale string `json:"scale,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
Question string `json:"question,omitempty"`
IdealAnswer string `json:"ideal_answer,omitempty"`
Rubric []string `json:"rubric,omitempty"`
TraceID string `json:"trace_id"`
PipelineVersion string `json:"pipeline_version"`
ScoringConfigVersion string `json:"scoring_config_version"`
RelevantIDs []string `json:"relevant_ids"`
RequiredEvidenceKinds []string `json:"required_evidence_kinds,omitempty"`
ExpectedNoAnswer bool `json:"expected_no_answer,omitempty"`
RubricContextScore float64 `json:"rubric_context_score,omitempty"`
RubricContextMatches []string `json:"rubric_context_matches,omitempty"`
CandidateMemoryIDs []string `json:"candidate_memory_ids"`
SelectedMemoryIDs []string `json:"selected_memory_ids"`
SelectedContext string `json:"selected_context,omitempty"`
CandidateEvidenceKinds []string `json:"candidate_evidence_kinds,omitempty"`
SelectedEvidenceKinds []string `json:"selected_evidence_kinds,omitempty"`
TopEvidenceKinds []string `json:"top_evidence_kinds,omitempty"`
RecallAt5 float64 `json:"recall_at_5"`
RecallAt10 float64 `json:"recall_at_10"`
ContextSatisfied bool `json:"context_satisfied"`
ProvenanceSatisfied bool `json:"provenance_satisfied,omitempty"`
TokenBudget int `json:"token_budget"`
SelectedTokens int `json:"selected_tokens"`
TokenBudgetWithin bool `json:"token_budget_within"`
LatencyMS int `json:"latency_ms"`
WarningCodes []string `json:"warning_codes"`
}
type RecallBenchmarkLatency ¶
type RecallBenchmarkReport ¶
type RecallBenchmarkReport struct {
Service string `json:"service"`
CorpusVersion string `json:"corpus_version"`
CaseCount int `json:"case_count"`
RecallAt5 float64 `json:"recall_at_5"`
RecallAt10 float64 `json:"recall_at_10"`
ContextHitRate float64 `json:"context_hit_rate"`
TokenBudgetPassRate float64 `json:"token_budget_pass_rate"`
Latency RecallBenchmarkLatency `json:"latency"`
WarningCount int `json:"warning_count"`
Warnings []RecallWarning `json:"warnings"`
Abilities []RecallBenchmarkAbilityReport `json:"abilities,omitempty"`
Cases []RecallBenchmarkCaseReport `json:"cases"`
}
func EvaluateRecallBenchmark ¶
func EvaluateRecallBenchmark(cases []RecallBenchmarkCase) RecallBenchmarkReport
func EvaluateServiceRecallBenchmark ¶
func EvaluateServiceRecallBenchmark(ctx context.Context, svc *Service, cases []RecallBenchmarkServiceCase) (RecallBenchmarkReport, error)
type RecallBenchmarkServiceCase ¶
type RecallBenchmarkServiceCase struct {
ID string
Ability string
Scale string
ConversationID string
Peer string
SessionKey string
Query string
IdealAnswer string
Rubric []string
ScopeID string
Memories []RecallBenchmarkServiceMemory
RelevantRefs []string
ContextContains []string
RequiredEvidenceKinds []string
ExpectedNoAnswer bool
Limit int
MaxTokens int
ScoringConfig RecallScoringConfig
PipelineVersion string
}
RecallBenchmarkServiceCase runs a tiny BEAM-style fixture through public conclusion writes and the recall pipeline before EvaluateRecallBenchmark aggregates the resulting RecallTrace.
func DefaultRecallBenchmarkServiceCases ¶
func DefaultRecallBenchmarkServiceCases() []RecallBenchmarkServiceCase
DefaultRecallBenchmarkServiceCases returns the local BEAM-style recall oracle for the MEMORIA categories Goncho currently implements deterministically. The cases intentionally use public Service.Conclude ingestion and benchmark refs instead of storage IDs, answer hints, LLM judges, or external datasets.
type RecallBenchmarkServiceMemory ¶
type RecallBenchmarkServiceMemory struct {
Ref string
Conclusion string
Peer string
SessionKey string
Scope string
}
RecallBenchmarkServiceMemory is one public Service.Conclude write used by a service-backed benchmark case. Ref is local to the case and maps benchmark relevant IDs to the concrete conclusion IDs generated during ingestion.
type RecallCandidate ¶
type RecallCandidate struct {
MemoryID string `json:"memory_id"`
SourceType string `json:"source_type"`
Content string `json:"content"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Importance float64 `json:"importance,omitempty"`
Provenance []EvidenceItem `json:"provenance,omitempty"`
}
type RecallDiagnosticsCandidate ¶
type RecallDiagnosticsCandidate struct {
MemoryID string `json:"memory_id"`
SourceType string `json:"source_type,omitempty"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ContentPreview string `json:"content_preview,omitempty"`
FinalScore float64 `json:"final_score"`
Scores RecallScore `json:"scores"`
WhySelected []string `json:"why_selected,omitempty"`
}
type RecallDiagnosticsRejection ¶
type RecallDiagnosticsRejection struct {
MemoryID string `json:"memory_id"`
SourceType string `json:"source_type,omitempty"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ContentPreview string `json:"content_preview,omitempty"`
Reason string `json:"reason"`
FinalScore float64 `json:"final_score"`
Scores RecallScore `json:"scores"`
WhyRejected []string `json:"why_rejected,omitempty"`
}
type RecallDiagnosticsReport ¶
type RecallDiagnosticsReport struct {
Service string `json:"service"`
Status string `json:"status"`
TraceID string `json:"trace_id"`
PipelineVersion string `json:"pipeline_version"`
Query RecallQuery `json:"query"`
ScoringConfig RecallScoringConfig `json:"scoring_config"`
CandidateCount int `json:"candidate_count"`
SelectedCount int `json:"selected_count"`
RejectedCount int `json:"rejected_count"`
WarningCount int `json:"warning_count"`
Selected []RecallDiagnosticsCandidate `json:"selected"`
Rejected []RecallDiagnosticsRejection `json:"rejected"`
Warnings []RecallWarning `json:"warnings"`
ProjectionInvariant string `json:"projection_invariant"`
DegradedPathContract string `json:"degraded_path_contract"`
}
func BuildRecallDiagnostics ¶
func BuildRecallDiagnostics(trace RecallTrace) RecallDiagnosticsReport
type RecallEngine ¶
type RecallEngine interface {
Run(ctx context.Context, q RecallQuery) (RecallTrace, error)
}
type RecallFeedback ¶ added in v0.3.0
type RecallFeedback struct {
ID string `json:"id"`
WorkspaceID string `json:"workspace_id"`
Peer string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
TraceID string `json:"trace_id,omitempty"`
Query string `json:"query,omitempty"`
Label RecallFeedbackLabel `json:"label"`
MemoryID string `json:"memory_id,omitempty"`
Reason string `json:"reason"`
SubmittedBy string `json:"submitted_by,omitempty"`
ReviewItemID string `json:"review_item_id,omitempty"`
Status RecallFeedbackStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
type RecallFeedbackLabel ¶ added in v0.3.0
type RecallFeedbackLabel string
const ( RecallFeedbackUseful RecallFeedbackLabel = "useful" RecallFeedbackWrong RecallFeedbackLabel = "wrong" RecallFeedbackStale RecallFeedbackLabel = "stale" RecallFeedbackUnsafe RecallFeedbackLabel = "unsafe" RecallFeedbackMissing RecallFeedbackLabel = "missing" )
type RecallFeedbackList ¶ added in v0.3.0
type RecallFeedbackList struct {
Items []RecallFeedback `json:"items"`
}
type RecallFeedbackParams ¶ added in v0.3.0
type RecallFeedbackParams struct {
WorkspaceID string `json:"workspace_id,omitempty"`
Peer string `json:"peer_id,omitempty"`
SessionKey string `json:"session_key,omitempty"`
TraceID string `json:"trace_id,omitempty"`
Query string `json:"query,omitempty"`
Label RecallFeedbackLabel `json:"label"`
MemoryID string `json:"memory_id,omitempty"`
Reason string `json:"reason"`
SubmittedBy string `json:"submitted_by,omitempty"`
}
type RecallFeedbackQuery ¶ added in v0.3.0
type RecallFeedbackStatus ¶ added in v0.3.0
type RecallFeedbackStatus string
const RecallFeedbackRecorded RecallFeedbackStatus = "recorded"
type RecallProjector ¶
type RecallProjector struct{}
func (*RecallProjector) ProjectContext ¶
func (p *RecallProjector) ProjectContext(trace RecallTrace) ContextResult
func (*RecallProjector) ProjectSearch ¶
func (p *RecallProjector) ProjectSearch(trace RecallTrace) SearchResultSet
type RecallQuery ¶
type RecallQuery struct {
WorkspaceID string `json:"workspace_id"`
Peer string `json:"peer"`
Query string `json:"query"`
SessionKey string `json:"session_key,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
Sources []string `json:"sources,omitempty"`
Limit int `json:"limit,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
}
type RecallReplay ¶
type RecallReplay struct {
Service string `json:"service"`
TraceID string `json:"trace_id"`
PipelineVersion string `json:"pipeline_version"`
ScoringConfigVersion string `json:"scoring_config_version"`
Query RecallQuery `json:"query"`
EventCount int `json:"event_count"`
Events []RecallReplayEvent `json:"events"`
ProjectionInvariant string `json:"projection_invariant"`
ReplayContract string `json:"replay_contract"`
}
func BuildRecallReplay ¶
func BuildRecallReplay(trace RecallTrace) RecallReplay
type RecallReplayEvent ¶
type RecallReplayEvent struct {
Index int `json:"index"`
Stage string `json:"stage"`
Kind string `json:"kind"`
MemoryID string `json:"memory_id,omitempty"`
SourceType string `json:"source_type,omitempty"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
Reason string `json:"reason,omitempty"`
FinalScore float64 `json:"final_score,omitempty"`
WarningCode string `json:"warning_code,omitempty"`
Severity string `json:"severity,omitempty"`
Details []string `json:"details,omitempty"`
}
type RecallScore ¶
type RecallScore struct {
KeywordScore float64 `json:"keyword_score"`
SemanticScore float64 `json:"semantic_score"`
GraphScore float64 `json:"graph_score"`
FactScore float64 `json:"fact_score,omitempty"`
RecencyScore float64 `json:"recency_score"`
ImportanceScore float64 `json:"importance_score"`
ScopeScore float64 `json:"scope_score"`
RRFScore float64 `json:"rrf_score"`
DiversityPenalty float64 `json:"diversity_penalty"`
FinalScore float64 `json:"final_score"`
WhySelected []string `json:"why_selected,omitempty"`
}
type RecallScoringConfig ¶
type RecallTrace ¶
type RecallTrace struct {
TraceID string `json:"trace_id"`
PipelineVersion string `json:"pipeline_version"`
CreatedAt time.Time `json:"created_at"`
Query RecallQuery `json:"query"`
ScoringConfig RecallScoringConfig `json:"scoring_config"`
Candidates []ScoredRecallCandidate `json:"candidates"`
Selected []ScoredRecallCandidate `json:"selected"`
Rejected []RejectedRecallCandidate `json:"rejected"`
Warnings []RecallWarning `json:"warnings"`
}
func DecodeRecallTraceJSON ¶
func DecodeRecallTraceJSON(r io.Reader) (RecallTrace, error)
func (RecallTrace) StableJSON ¶
func (t RecallTrace) StableJSON() ([]byte, error)
type RecallWarning ¶
type RegressionGateInput ¶ added in v0.3.0
type RegressionGateResult ¶ added in v0.3.0
type RegressionGateResult struct {
Metric string `json:"metric"`
Baseline float64 `json:"baseline"`
Current float64 `json:"current"`
Tolerance float64 `json:"tolerance"`
Drop float64 `json:"drop"`
Pass bool `json:"pass"`
Reason string `json:"reason"`
}
func EvaluateRegressionGate ¶ added in v0.3.0
func EvaluateRegressionGate(input RegressionGateInput) RegressionGateResult
type RejectedRecallCandidate ¶
type RejectedRecallCandidate struct {
Candidate RecallCandidate `json:"candidate"`
Score RecallScore `json:"score"`
Reason string `json:"reason"`
WhyRejected []string `json:"why_rejected,omitempty"`
}
type RetentionAction ¶
type RetentionAction = importance.RetentionAction
const ( RetentionActionSummarize RetentionAction = importance.RetentionActionSummarize RetentionActionForget RetentionAction = importance.RetentionActionForget )
const RetentionActionArchive RetentionAction = "archive"
type RetentionApplyResult ¶ added in v0.3.0
type RetentionAuditEvent ¶ added in v0.3.0
type RetentionAuditEvent struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
StableID string `json:"stable_id"`
TargetType string `json:"target_type"`
Action RetentionAction `json:"action"`
Reason string `json:"reason"`
AppliedBy string `json:"applied_by"`
CreatedAt time.Time `json:"created_at"`
}
type RetentionAuditQuery ¶ added in v0.3.0
type RetentionAuditResult ¶ added in v0.3.0
type RetentionAuditResult struct {
Events []RetentionAuditEvent `json:"events"`
}
type RetentionCandidate ¶
type RetentionCandidate struct {
Entry MemoryToolEntry
Age time.Duration
EffectiveImportance float64
Action RetentionAction
Reason string
}
type RetentionPolicy ¶
type RetentionPolicy struct {
Now time.Time
MinAge time.Duration
MinEffectiveImportance float64
Limit int
KeepForever bool `json:"keep_forever,omitempty"`
MaxAge time.Duration `json:"max_age,omitempty"`
MaxDBBytes int64 `json:"max_db_bytes,omitempty"`
MaxImageBytes int64 `json:"max_image_bytes,omitempty"`
MaxVectorBytes int64 `json:"max_vector_bytes,omitempty"`
PerWorkspaceLimit int `json:"per_workspace_limit,omitempty"`
ArchiveBeforeEvict bool `json:"archive_before_evict,omitempty"`
ImageDir string `json:"image_dir,omitempty"`
VectorDir string `json:"vector_dir,omitempty"`
}
type RetentionPolicyView ¶ added in v0.3.0
type RetentionPolicyView struct {
KeepForever bool `json:"keep_forever,omitempty"`
MaxAgeSeconds int64 `json:"max_age_seconds,omitempty"`
MaxDBBytes int64 `json:"max_db_bytes,omitempty"`
MaxImageBytes int64 `json:"max_image_bytes,omitempty"`
MaxVectorBytes int64 `json:"max_vector_bytes,omitempty"`
PerWorkspaceLimit int `json:"per_workspace_limit,omitempty"`
ArchiveBeforeEvict bool `json:"archive_before_evict,omitempty"`
ImageDir string `json:"image_dir,omitempty"`
VectorDir string `json:"vector_dir,omitempty"`
}
type RetentionPreview ¶ added in v0.3.0
type RetentionPreview struct {
WorkspaceID string `json:"workspace_id"`
Mutates bool `json:"mutates"`
Policy RetentionPolicyView `json:"policy"`
Disk DiskUsageDiagnostics `json:"disk"`
Candidates []EvictionCandidate `json:"candidates"`
}
type RetrieveMemoryTool ¶
type RetrieveMemoryTool struct {
// contains filtered or unexported fields
}
func NewRetrieveMemoryTool ¶
func NewRetrieveMemoryTool(store MemoryToolStore) *RetrieveMemoryTool
func (RetrieveMemoryTool) Description ¶
func (t RetrieveMemoryTool) Description() string
func (RetrieveMemoryTool) Execute ¶
func (t RetrieveMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (RetrieveMemoryTool) Schema ¶
func (t RetrieveMemoryTool) Schema() json.RawMessage
func (RetrieveMemoryTool) Spec ¶
func (t RetrieveMemoryTool) Spec() toolmeta.OperationSpec
type ReviewItem ¶
type ReviewItem = reviewlog.ReviewItem
func CreateReviewItem ¶
func CreateReviewItem(ctx context.Context, db *sql.DB, p ReviewItemCreateParams) (ReviewItem, error)
func ResolveReviewItem ¶
func ResolveReviewItem(ctx context.Context, db *sql.DB, p ReviewResolutionParams) (ReviewItem, error)
type ReviewItemCreateParams ¶
type ReviewItemCreateParams = reviewlog.ReviewItemCreateParams
type ReviewKind ¶
type ReviewKind = reviewlog.ReviewKind
const ( ReviewKindConflict ReviewKind = reviewlog.ReviewKindConflict ReviewKindStale ReviewKind = reviewlog.ReviewKindStale )
type ReviewList ¶
type ReviewList = reviewlog.ReviewList
func ListReviewItems ¶
func ListReviewItems(ctx context.Context, db *sql.DB, q ReviewQuery) (ReviewList, error)
type ReviewQuery ¶
type ReviewQuery = reviewlog.ReviewQuery
type ReviewResolution ¶
type ReviewResolution = reviewlog.ReviewResolution
const ( ReviewResolutionAccepted ReviewResolution = reviewlog.ReviewResolutionAccepted ReviewResolutionRejected ReviewResolution = reviewlog.ReviewResolutionRejected ReviewResolutionSuperseded ReviewResolution = reviewlog.ReviewResolutionSuperseded ReviewResolutionVerified ReviewResolution = reviewlog.ReviewResolutionVerified )
type ReviewResolutionParams ¶
type ReviewResolutionParams = reviewlog.ReviewResolutionParams
type ReviewStatus ¶
type ReviewStatus = reviewlog.ReviewStatus
const ( ReviewStatusOpen ReviewStatus = reviewlog.ReviewStatusOpen ReviewStatusResolved ReviewStatus = reviewlog.ReviewStatusResolved )
type ReviewTool ¶
type ReviewTool struct {
// contains filtered or unexported fields
}
func NewReviewTool ¶
func NewReviewTool(svc *Service) *ReviewTool
func (*ReviewTool) Description ¶
func (t *ReviewTool) Description() string
func (*ReviewTool) Execute ¶
func (t *ReviewTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*ReviewTool) Name ¶
func (t *ReviewTool) Name() string
func (*ReviewTool) Schema ¶
func (t *ReviewTool) Schema() json.RawMessage
func (*ReviewTool) Spec ¶
func (t *ReviewTool) Spec() toolmeta.OperationSpec
func (*ReviewTool) Timeout ¶
func (t *ReviewTool) Timeout() time.Duration
type ScoredMemory ¶
type ScoredMemory struct {
Entry MemoryToolEntry
Relevance float64
Recency float64
EffectiveImportance float64
Score float64
}
type ScoredRecallCandidate ¶
type ScoredRecallCandidate struct {
Candidate RecallCandidate `json:"candidate"`
Score RecallScore `json:"score"`
}
type SearchFilter ¶
type SearchFilter struct {
UserID string
Sources []string
SessionIDs []string
Query string
Roles []string
CurrentSessionID string
CurrentChatKey string
}
SearchFilter narrows cross-session search to one canonical user.
type SearchHit ¶
type SearchHit struct {
ID int64 `json:"id,omitempty"`
Source string `json:"source"`
OriginSource string `json:"origin_source,omitempty"`
Content string `json:"content"`
SessionKey string `json:"session_key,omitempty"`
Lineage *SearchLineage `json:"lineage,omitempty"`
Provenance []EvidenceItem `json:"provenance,omitempty"`
// contains filtered or unexported fields
}
SearchHit is one result entry returned by search.
type SearchLineage ¶
type SearchLineage struct {
ParentSessionID string `json:"parent_session_id,omitempty"`
LineageKind string `json:"lineage_kind,omitempty"`
ChildSessionIDs []string `json:"child_session_ids,omitempty"`
Status string `json:"status"`
}
SearchLineage is operator evidence for the session lineage attached to a search hit.
type SearchParams ¶
type SearchParams struct {
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Query string `json:"query"`
MaxTokens int `json:"max_tokens,omitempty"`
SessionKey string `json:"session_key,omitempty"`
Scope string `json:"scope,omitempty"`
Sources []string `json:"sources,omitempty"`
Filters map[string]any `json:"filters,omitempty"`
Limit int `json:"limit,omitempty"`
}
SearchParams controls retrieval for honcho_search.
type SearchResultSet ¶
type SearchResultSet struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Query string `json:"query"`
ScopeEvidence *CrossChatRecallEvidence `json:"scope_evidence,omitempty"`
Results []SearchHit `json:"results"`
}
SearchResultSet is the stable JSON shape for honcho_search.
type ServerModeSecurityRequirement ¶ added in v0.3.0
type ServerModeSecurityRequirement struct {
Mode string `json:"mode"`
Status ServerModeSecurityStatus `json:"status"`
EnforcementEnabled bool `json:"enforcement_enabled"`
Roles []string `json:"roles"`
ThreatModelSummary string `json:"threat_model_summary"`
AuthRequirement string `json:"auth_requirement"`
PostgresAdapterPlan string `json:"postgres_adapter_plan"`
BackupRestoreRequirement string `json:"backup_restore_requirement"`
}
ServerModeSecurityRequirement is the public, non-enforcing contract for the first server-mode security slice. It intentionally documents the minimum controls future shared/team work must satisfy without weakening local mode.
func ServerModeSecurityRequirements ¶ added in v0.3.0
func ServerModeSecurityRequirements() ServerModeSecurityRequirement
ServerModeSecurityRequirements returns the requirements-only threat/RBAC contract for future server/team mode. It is safe to surface from CLI/doctor flows because it does not grant access or mutate state.
type ServerModeSecurityStatus ¶ added in v0.3.0
type ServerModeSecurityStatus string
ServerModeSecurityStatus describes how much shared-server security is active.
const ( // ServerModeStatusRequirementsOnly means Goncho has documented server-mode // contracts but has not enabled shared/team enforcement yet. ServerModeStatusRequirementsOnly ServerModeSecurityStatus = "requirements_only" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the first in-binary Goncho domain facade. It sits directly on top of the SQLite store used by Gormes today.
func NewService ¶
NewService constructs a Goncho service with conservative defaults.
Example ¶
ctx := context.Background()
dir, err := os.MkdirTemp("", "goncho-example-*")
if err != nil {
panic(err)
}
defer func() { _ = os.RemoveAll(dir) }()
store, err := memory.OpenSqlite(filepath.Join(dir, "memory.db"), 0, nil)
if err != nil {
panic(err)
}
defer func() { _ = store.Close(ctx) }()
if err := goncho.RunMigrations(store.DB()); err != nil {
panic(err)
}
svc := goncho.NewService(store.DB(), goncho.Config{
WorkspaceID: "example-agent",
ObserverPeerID: "assistant",
}, nil)
if err := svc.SetProfile(ctx, "user:juan", []string{
"Prefers SQLite-backed local memory.",
}); err != nil {
panic(err)
}
profile, err := svc.Profile(ctx, "user:juan")
if err != nil {
panic(err)
}
fmt.Println(profile.Card[0])
Output: Prefers SQLite-backed local memory.
func (*Service) AcquireActionLease ¶ added in v0.3.0
func (s *Service) AcquireActionLease(ctx context.Context, params ActionLeaseParams) (ActionLeaseResult, error)
func (*Service) AppendMemorySlot ¶
func (s *Service) AppendMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
func (*Service) ApplyRetention ¶ added in v0.3.0
func (s *Service) ApplyRetention(ctx context.Context, policy RetentionPolicy, appliedBy string) (RetentionApplyResult, error)
func (*Service) ApproveSkillLearningProposal ¶
func (s *Service) ApproveSkillLearningProposal(ctx context.Context, p SkillLearningProposalReviewParams) (SkillLearningProposal, error)
func (*Service) AuditTrail ¶
func (s *Service) AuditTrail(ctx context.Context, q AuditQuery) (AuditResult, error)
func (*Service) CaptureHostHook ¶
func (s *Service) CaptureHostHook(ctx context.Context, event HostHookEvent) (HookCaptureResult, error)
CaptureHostHook records a host-neutral hook event into Goncho's observation log and, for conversational events, the session message stream.
func (*Service) Chat ¶
func (s *Service) Chat(ctx context.Context, peer string, params ChatParams) (ChatResult, error)
func (*Service) CompleteAction ¶
func (s *Service) CompleteAction(ctx context.Context, query ActionGraphQuery) (ActionNode, error)
func (*Service) Conclude ¶
func (s *Service) Conclude(ctx context.Context, params ConcludeParams) (ConcludeResult, error)
func (*Service) Context ¶
func (s *Service) Context(ctx context.Context, params ContextParams) (ContextResult, error)
Example ¶
ctx := context.Background()
dir, err := os.MkdirTemp("", "goncho-context-example-*")
if err != nil {
panic(err)
}
defer func() { _ = os.RemoveAll(dir) }()
store, err := memory.OpenSqlite(filepath.Join(dir, "memory.db"), 0, nil)
if err != nil {
panic(err)
}
defer func() { _ = store.Close(ctx) }()
if err := goncho.RunMigrations(store.DB()); err != nil {
panic(err)
}
svc := goncho.NewService(store.DB(), goncho.Config{
WorkspaceID: "example-agent",
ObserverPeerID: "assistant",
}, nil)
if err := svc.SetProfile(ctx, "user:juan", []string{
"Prefers verification before action.",
}); err != nil {
panic(err)
}
if _, err := svc.Conclude(ctx, goncho.ConcludeParams{
Peer: "user:juan",
Conclusion: "Use SQLite local memory for agent handoffs.",
}); err != nil {
panic(err)
}
orientation, err := svc.Context(ctx, goncho.ContextParams{
Peer: "user:juan",
Query: "handoffs",
MaxTokens: 2000,
})
if err != nil {
panic(err)
}
fmt.Println(orientation.Representation)
Output: Representation for user:juan: Profile facts: - Prefers verification before action. Current conclusions: - Use SQLite local memory for agent handoffs.
func (*Service) CreateMemorySlot ¶
func (s *Service) CreateMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
func (*Service) CreateMessages ¶
func (s *Service) CreateMessages(ctx context.Context, params CreateMessagesParams) (CreateMessagesResult, error)
func (*Service) CreateReviewItem ¶
func (s *Service) CreateReviewItem(ctx context.Context, p ReviewItemCreateParams) (ReviewItem, error)
func (*Service) DeleteMemorySlot ¶
func (s *Service) DeleteMemorySlot(ctx context.Context, query MemorySlotQuery) (MemorySlot, error)
func (*Service) DeleteSession ¶
func (*Service) DeleteWebhookEndpoint ¶
func (*Service) DeleteWorkspace ¶
func (s *Service) DeleteWorkspace(ctx context.Context) (WorkspaceDeletionResult, error)
func (*Service) DialecticCaller ¶
func (s *Service) DialecticCaller() DialecticCaller
func (*Service) DiskUsage ¶ added in v0.3.0
func (s *Service) DiskUsage(ctx context.Context, policy RetentionPolicy) (DiskUsageDiagnostics, error)
func (*Service) ExecuteDreamCompression ¶
func (*Service) ExecuteDreamFactExtraction ¶
func (*Service) ExecuteFourTierConsolidation ¶
func (s *Service) ExecuteFourTierConsolidation(ctx context.Context, params FourTierConsolidationParams) (FourTierConsolidationResult, error)
func (*Service) ExpireActionLeases ¶ added in v0.3.0
func (s *Service) ExpireActionLeases(ctx context.Context, params ActionLeaseExpireParams) (ActionLeaseExpireResult, error)
func (*Service) ExportPortableJSONL ¶ added in v0.3.0
func (s *Service) ExportPortableJSONL(ctx context.Context, params PortableExportParams) (PortableExportResult, error)
func (*Service) ExportPortableMarkdown ¶ added in v0.3.0
func (*Service) ExportSnapshotManifest ¶
func (s *Service) ExportSnapshotManifest(ctx context.Context, params SnapshotParams) (SnapshotManifest, error)
func (*Service) ExtractMemoryProposals ¶ added in v0.3.0
func (s *Service) ExtractMemoryProposals(ctx context.Context, params ExtractMemoryProposalsParams) (ExtractMemoryProposalsResult, error)
func (*Service) GetMemorySlot ¶
func (s *Service) GetMemorySlot(ctx context.Context, query MemorySlotQuery) (MemorySlot, error)
func (*Service) GetOrCreateWebhookEndpoint ¶
func (s *Service) GetOrCreateWebhookEndpoint(ctx context.Context, params WebhookEndpointCreateParams) (WebhookEndpointCreateResult, error)
func (*Service) GetSkillLearningProposal ¶
func (*Service) ImportFile ¶
func (s *Service) ImportFile(ctx context.Context, params ImportFileParams) (FileImportResult, error)
ImportFile converts a text-like file into ordinary ready user turns for the requested session. The original uploaded bytes are only used for extraction.
func (*Service) ImportFilesystemWatcherChanges ¶ added in v0.3.0
func (s *Service) ImportFilesystemWatcherChanges(ctx context.Context, params FilesystemWatcherImportParams) (FilesystemWatcherImportResult, error)
func (*Service) ImportPortableJSONL ¶ added in v0.3.0
func (s *Service) ImportPortableJSONL(ctx context.Context, params PortableImportParams) (PortableImportResult, error)
func (*Service) ListActionLeaseAudit ¶ added in v0.3.0
func (s *Service) ListActionLeaseAudit(ctx context.Context, query ActionLeaseAuditQuery) (ActionLeaseAuditResult, error)
func (*Service) ListActionSignalReceiptAudit ¶ added in v0.3.0
func (s *Service) ListActionSignalReceiptAudit(ctx context.Context, query ActionSignalReceiptAuditQuery) (ActionSignalReceiptAuditResult, error)
func (*Service) ListActionSignalReceipts ¶ added in v0.3.0
func (s *Service) ListActionSignalReceipts(ctx context.Context, query ActionSignalReceiptQuery) (ActionSignalReceiptList, error)
func (*Service) ListEvalCandidates ¶ added in v0.3.0
func (s *Service) ListEvalCandidates(ctx context.Context, q EvalCandidateQuery) (EvalCandidateList, error)
func (*Service) ListMemorySlots ¶
func (s *Service) ListMemorySlots(ctx context.Context, query MemorySlotQuery) (MemorySlotList, error)
func (*Service) ListObservations ¶
func (s *Service) ListObservations(ctx context.Context, q ObservationQuery) (ObservationList, error)
func (*Service) ListPendingSkillLearningProposals ¶
func (s *Service) ListPendingSkillLearningProposals(ctx context.Context, q SkillLearningProposalQuery) (SkillLearningProposalList, error)
func (*Service) ListRecallFeedback ¶ added in v0.3.0
func (s *Service) ListRecallFeedback(ctx context.Context, q RecallFeedbackQuery) (RecallFeedbackList, error)
func (*Service) ListReviewItems ¶
func (s *Service) ListReviewItems(ctx context.Context, q ReviewQuery) (ReviewList, error)
func (*Service) ListTeamFeedAudit ¶ added in v0.3.0
func (s *Service) ListTeamFeedAudit(ctx context.Context, query TeamFeedAuditQuery) (TeamFeedAuditResult, error)
func (*Service) ListWebhookEndpoints ¶
func (*Service) NewStreamingChatPersistence ¶
func (s *Service) NewStreamingChatPersistence(peer string, params ChatParams) (*StreamingChatPersistence, error)
func (*Service) Observe ¶
func (s *Service) Observe(ctx context.Context, p ObservationParams) (ObservationResult, error)
func (*Service) OnSessionEnd ¶
func (*Service) PreviewFilesystemWatcherImport ¶ added in v0.3.0
func (s *Service) PreviewFilesystemWatcherImport(ctx context.Context, params FilesystemWatcherImportParams) (FilesystemWatcherPreview, error)
func (*Service) PreviewPortableImport ¶ added in v0.3.0
func (*Service) PreviewRetention ¶ added in v0.3.0
func (s *Service) PreviewRetention(ctx context.Context, policy RetentionPolicy) (RetentionPreview, error)
func (*Service) ProfileForTarget ¶
func (*Service) ProfileInNamespace ¶
func (s *Service) ProfileInNamespace(ctx context.Context, ns MemoryNamespace) (ProfileResult, error)
func (*Service) ProviderHealthDiagnostics ¶ added in v0.3.0
func (s *Service) ProviderHealthDiagnostics() ProviderHealthDiagnostics
func (*Service) ReadActionGraph ¶
func (s *Service) ReadActionGraph(ctx context.Context, query ActionGraphQuery) (ActionGraph, error)
func (*Service) Recall ¶
func (s *Service) Recall(ctx context.Context, q RecallQuery) (RecallTrace, error)
Recall runs the full scored recall pipeline against stored conclusions and returns a deterministic trace with candidates, scores, selection reasoning, and warnings. Unlike Search, which returns flat result rows, Recall exposes the scoring and provenance chain so hosts can audit why each memory was selected or rejected.
Example ¶
ctx := context.Background()
dir, err := os.MkdirTemp("", "goncho-recall-example-*")
if err != nil {
panic(err)
}
defer func() { _ = os.RemoveAll(dir) }()
store, err := memory.OpenSqlite(filepath.Join(dir, "memory.db"), 0, nil)
if err != nil {
panic(err)
}
defer func() { _ = store.Close(ctx) }()
if err := goncho.RunMigrations(store.DB()); err != nil {
panic(err)
}
svc := goncho.NewService(store.DB(), goncho.Config{
WorkspaceID: "example-agent",
ObserverPeerID: "assistant",
}, nil)
if _, err := svc.Conclude(ctx, goncho.ConcludeParams{
Peer: "user:juan",
Conclusion: "Recall traces preserve scoring provenance for deployment notes.",
}); err != nil {
panic(err)
}
trace, err := svc.Recall(ctx, goncho.RecallQuery{
Peer: "user:juan",
Query: "scoring provenance",
Limit: 1,
})
if err != nil {
panic(err)
}
fmt.Printf("%s selected=%d provenance=%t\n", trace.PipelineVersion, len(trace.Selected), len(trace.Selected[0].Candidate.Provenance) > 0)
Output: goncho-recall-v1 selected=1 provenance=true
func (*Service) RecordActionSignalReceipt ¶ added in v0.3.0
func (s *Service) RecordActionSignalReceipt(ctx context.Context, params ActionSignalReceiptParams) (ActionSignalReceiptResult, error)
func (*Service) RecordEvalFailures ¶ added in v0.3.0
func (s *Service) RecordEvalFailures(ctx context.Context, input EvalRegistryInput) (EvalRegistryResult, error)
func (*Service) RecordRecallFeedback ¶ added in v0.3.0
func (s *Service) RecordRecallFeedback(ctx context.Context, params RecallFeedbackParams) (RecallFeedback, error)
func (*Service) RecordSkillOutcome ¶
func (s *Service) RecordSkillOutcome(ctx context.Context, outcome SkillOutcome) error
RecordSkillOutcome writes a skill execution result as a Goncho conclusion. The source prefix "skill:<name>" is embedded in the conclusion text for later querying.
func (*Service) RejectSkillLearningProposal ¶
func (s *Service) RejectSkillLearningProposal(ctx context.Context, p SkillLearningProposalReviewParams) (SkillLearningProposal, error)
func (*Service) RenewActionLease ¶ added in v0.3.0
func (s *Service) RenewActionLease(ctx context.Context, params ActionLeaseParams) (ActionLeaseResult, error)
func (*Service) ReplaceMemorySlot ¶
func (s *Service) ReplaceMemorySlot(ctx context.Context, params MemorySlotParams) (MemorySlot, error)
func (*Service) ResolveReviewItem ¶
func (s *Service) ResolveReviewItem(ctx context.Context, p ReviewResolutionParams) (ReviewItem, error)
func (*Service) RetentionAudit ¶ added in v0.3.0
func (s *Service) RetentionAudit(ctx context.Context, q RetentionAuditQuery) (RetentionAuditResult, error)
func (*Service) ScheduleDream ¶
func (s *Service) ScheduleDream(ctx context.Context, params DreamScheduleParams) (DreamScheduleResult, error)
func (*Service) Search ¶
func (s *Service) Search(ctx context.Context, params SearchParams) (SearchResultSet, error)
Example ¶
ctx := context.Background()
dir, err := os.MkdirTemp("", "goncho-search-example-*")
if err != nil {
panic(err)
}
defer func() { _ = os.RemoveAll(dir) }()
store, err := memory.OpenSqlite(filepath.Join(dir, "memory.db"), 0, nil)
if err != nil {
panic(err)
}
defer func() { _ = store.Close(ctx) }()
if err := goncho.RunMigrations(store.DB()); err != nil {
panic(err)
}
svc := goncho.NewService(store.DB(), goncho.Config{
WorkspaceID: "example-agent",
ObserverPeerID: "assistant",
}, nil)
if _, err := svc.Conclude(ctx, goncho.ConcludeParams{
Peer: "user:juan",
Conclusion: "Keep deployment notes evidence-first and searchable.",
}); err != nil {
panic(err)
}
results, err := svc.Search(ctx, goncho.SearchParams{
Peer: "user:juan",
Query: "deployment evidence",
Limit: 1,
})
if err != nil {
panic(err)
}
fmt.Printf("%s: %s\n", results.Results[0].Source, results.Results[0].Content)
Output: conclusion: Keep deployment notes evidence-first and searchable.
func (*Service) SearchImageMemories ¶
func (s *Service) SearchImageMemories(ctx context.Context, query ImageMemoryQuery) (ImageMemoryList, error)
func (*Service) SearchSkillOutcomes ¶
func (s *Service) SearchSkillOutcomes(ctx context.Context, skillName string, limit int) ([]string, error)
SearchSkillOutcomes returns conclusions from skill executions matching the given skill name.
func (*Service) SetDialecticCaller ¶
func (s *Service) SetDialecticCaller(dc DialecticCaller)
func (*Service) SetProfile ¶
func (*Service) SetProfileForTarget ¶
func (*Service) SetProfileInNamespace ¶
func (*Service) SignalAction ¶
func (s *Service) SignalAction(ctx context.Context, params ActionSignalParams) (ActionSignal, error)
func (*Service) StoreImageMemory ¶
func (s *Service) StoreImageMemory(ctx context.Context, params ImageMemoryParams) (ImageMemory, error)
func (*Service) SubmitSkillLearningProposal ¶
func (s *Service) SubmitSkillLearningProposal(ctx context.Context, p SkillLearningProposalCreateParams) (SkillLearningProposalRef, error)
func (*Service) TeamFeed ¶ added in v0.3.0
func (s *Service) TeamFeed(ctx context.Context, query TeamFeedQuery) (TeamFeedResult, error)
func (*Service) UpsertAction ¶
func (s *Service) UpsertAction(ctx context.Context, params ActionParams) (ActionNode, error)
func (*Service) VerifiedCodeContext ¶
func (s *Service) VerifiedCodeContext(ctx context.Context, params VerifiedCodeContextParams) (VerifiedCodeContextResult, error)
func (*Service) ViewerSessionTimeline ¶ added in v0.3.0
func (*Service) ViewerSnapshot ¶ added in v0.3.0
func (s *Service) ViewerSnapshot(ctx context.Context) (ViewerSnapshot, error)
ViewerSnapshot returns a local-first, read-only overview for viewer clients.
type SessionBoundaryDecision ¶
type SessionBoundaryDecision struct {
Kind SessionBoundaryKind
SessionKey string
Evidence []string
}
func ResolveSessionBoundary ¶
func ResolveSessionBoundary(req SessionBoundaryRequest) (SessionBoundaryDecision, error)
type SessionBoundaryKind ¶
type SessionBoundaryKind string
const ( SessionBoundaryThread SessionBoundaryKind = "thread" SessionBoundaryChannel SessionBoundaryKind = "channel" SessionBoundaryRepository SessionBoundaryKind = "repository" SessionBoundaryImportBatch SessionBoundaryKind = "import_batch" SessionBoundaryDelegatedChildRun SessionBoundaryKind = "delegated_child_run" )
type SessionBoundaryRequest ¶
type SessionBoundaryRequest struct {
Kind SessionBoundaryKind
Key string
Source string
}
type SessionDeletionResult ¶
type SessionDirectory ¶
type SessionDirectory interface {
ListMetadataByUserID(ctx context.Context, userID string) ([]SessionMetadata, error)
}
SessionDirectory exposes the canonical user->session metadata seam needed for user-scoped cross-chat search.
type SessionMemoryDeletionPlan ¶
type SessionMemoryDeletionPlan struct {
SessionID string
Preserve bool
Preserved []MemoryToolEntry
CascadeForget []MemoryToolEntry
}
func PlanSessionMemoryDeletion ¶
func PlanSessionMemoryDeletion(entries []MemoryToolEntry, sessionID string, cascade bool) SessionMemoryDeletionPlan
type SessionMetadata ¶
type SessionMetadata struct {
SessionID string `json:"session_id"`
Source string `json:"source,omitempty"`
ChatID string `json:"chat_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Title string `json:"title,omitempty"`
ParentSessionID string `json:"parent_session_id,omitempty"`
LineageKind string `json:"lineage_kind"`
CreatedAt int64 `json:"created_at,omitempty"`
UpdatedAt int64 `json:"updated_at"`
}
SessionMetadata is the goncho-owned subset of session directory metadata needed for user-scoped cross-chat search. This type exists so goncho can be extracted as a standalone repository without importing internal/session.
type SessionSummary ¶
type SessionSummary struct {
Content string `json:"content"`
MessageID int64 `json:"message_id"`
SummaryType string `json:"summary_type"`
CreatedAt int64 `json:"created_at"`
TokenCount int `json:"token_count"`
}
SessionSummary is the summary component returned by session context when a short or long summary slot fits inside the requested summary budget.
type SkillLearningProposal ¶
type SkillLearningProposal = skillproposals.SkillLearningProposal
type SkillLearningProposalCreateParams ¶
type SkillLearningProposalCreateParams = skillproposals.SkillLearningProposalCreateParams
type SkillLearningProposalList ¶
type SkillLearningProposalList = skillproposals.SkillLearningProposalList
func ListSkillLearningProposals ¶
func ListSkillLearningProposals(ctx context.Context, db *sql.DB, q SkillLearningProposalQuery) (SkillLearningProposalList, error)
type SkillLearningProposalQuery ¶
type SkillLearningProposalQuery = skillproposals.SkillLearningProposalQuery
type SkillLearningProposalRef ¶
type SkillLearningProposalRef = skillproposals.SkillLearningProposalRef
func SubmitSkillLearningProposal ¶
func SubmitSkillLearningProposal(ctx context.Context, db *sql.DB, p SkillLearningProposalCreateParams) (SkillLearningProposalRef, error)
type SkillLearningProposalReviewParams ¶
type SkillLearningProposalReviewParams = skillproposals.SkillLearningProposalReviewParams
type SkillLearningProposalStatus ¶
type SkillLearningProposalStatus = skillproposals.SkillLearningProposalStatus
const ( SkillLearningProposalPending SkillLearningProposalStatus = skillproposals.SkillLearningProposalPending SkillLearningProposalApproved SkillLearningProposalStatus = skillproposals.SkillLearningProposalApproved SkillLearningProposalRejected SkillLearningProposalStatus = skillproposals.SkillLearningProposalRejected )
type SkillOutcome ¶
SkillOutcome records the result of a skill execution.
type SnapshotDiff ¶
type SnapshotDiff struct {
FromSnapshotID string `json:"from_snapshot_id"`
ToSnapshotID string `json:"to_snapshot_id"`
Added []SnapshotEntry `json:"added"`
Removed []SnapshotEntry `json:"removed"`
Changed []SnapshotEntry `json:"changed"`
}
func DiffSnapshotManifests ¶
func DiffSnapshotManifests(from, to SnapshotManifest) SnapshotDiff
type SnapshotEntry ¶
type SnapshotGitMetadata ¶
type SnapshotManifest ¶
type SnapshotManifest struct {
ManifestVersion string `json:"manifest_version"`
SnapshotID string `json:"snapshot_id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Git SnapshotGitMetadata `json:"git"`
Counts map[string]int `json:"counts"`
Entries []SnapshotEntry `json:"entries"`
}
type SnapshotParams ¶
type SnapshotRollbackMetadata ¶
type SnapshotRollbackMetadata struct {
AdapterOwned bool `json:"adapter_owned"`
Applied bool `json:"applied"`
FromSnapshotID string `json:"from_snapshot_id"`
TargetSnapshotID string `json:"target_snapshot_id"`
Operation string `json:"operation"`
Note string `json:"note"`
}
func BuildSnapshotRollbackMetadata ¶
func BuildSnapshotRollbackMetadata(from, target SnapshotManifest) SnapshotRollbackMetadata
type StoreMemoryTool ¶
type StoreMemoryTool struct {
// contains filtered or unexported fields
}
func NewStoreMemoryTool ¶
func NewStoreMemoryTool(store MemoryToolStore) *StoreMemoryTool
func (StoreMemoryTool) Description ¶
func (t StoreMemoryTool) Description() string
func (StoreMemoryTool) Execute ¶
func (t StoreMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (StoreMemoryTool) Schema ¶
func (t StoreMemoryTool) Schema() json.RawMessage
func (StoreMemoryTool) Spec ¶
func (t StoreMemoryTool) Spec() toolmeta.OperationSpec
type StreamingChatPersistence ¶
type StreamingChatPersistence struct {
// contains filtered or unexported fields
}
StreamingChatPersistence buffers stream chunks until a terminal event decides whether the assistant response is complete enough to become durable memory.
func (*StreamingChatPersistence) AppendChunk ¶
func (p *StreamingChatPersistence) AppendChunk(chunk string)
func (*StreamingChatPersistence) Complete ¶
func (p *StreamingChatPersistence) Complete(ctx context.Context, meta ChatCompletionMetadata) (ChatResult, error)
func (*StreamingChatPersistence) Interrupt ¶
func (p *StreamingChatPersistence) Interrupt(reason string) ChatResult
type StructuredSummary ¶
type StructuredSummary struct {
FilesModified []string `json:"files_modified,omitempty"`
DecisionsMade []string `json:"decisions_made,omitempty"`
OpenQuestions []string `json:"open_questions,omitempty"`
SkillOutcomes []string `json:"skill_outcomes,omitempty"`
NextSteps []string `json:"next_steps,omitempty"`
}
StructuredSummary captures session-end facts for cross-session continuity.
type SummarizeMemoryTool ¶
type SummarizeMemoryTool struct {
// contains filtered or unexported fields
}
func NewSummarizeMemoryTool ¶
func NewSummarizeMemoryTool(store MemoryToolStore) *SummarizeMemoryTool
func (SummarizeMemoryTool) Description ¶
func (t SummarizeMemoryTool) Description() string
func (SummarizeMemoryTool) Execute ¶
func (t SummarizeMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (SummarizeMemoryTool) Schema ¶
func (t SummarizeMemoryTool) Schema() json.RawMessage
func (SummarizeMemoryTool) Spec ¶
func (t SummarizeMemoryTool) Spec() toolmeta.OperationSpec
type TeamFeedAuditEvent ¶ added in v0.3.0
type TeamFeedAuditEvent struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Actor string `json:"actor"`
ActorWorkspaceID string `json:"actor_workspace_id,omitempty"`
ActorProfileID string `json:"actor_profile_id,omitempty"`
Role string `json:"role,omitempty"`
Decision TeamFeedDecision `json:"decision"`
Reason string `json:"reason,omitempty"`
CreatedAt int64 `json:"created_at"`
}
type TeamFeedAuditQuery ¶ added in v0.3.0
type TeamFeedAuditResult ¶ added in v0.3.0
type TeamFeedAuditResult struct {
Events []TeamFeedAuditEvent `json:"events"`
Count int `json:"count"`
}
type TeamFeedDecision ¶ added in v0.3.0
type TeamFeedDecision string
const ( TeamFeedDecisionAllowed TeamFeedDecision = "allowed" TeamFeedDecisionDenied TeamFeedDecision = "denied" )
type TeamFeedEntry ¶ added in v0.3.0
type TeamFeedEntry struct {
ID string `json:"id"`
Kind string `json:"kind"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
ActionID string `json:"action_id"`
SignalID int64 `json:"signal_id"`
Signal string `json:"signal"`
Message string `json:"message,omitempty"`
Actor string `json:"actor,omitempty"`
CreatedAt int64 `json:"created_at"`
}
type TeamFeedQuery ¶ added in v0.3.0
type TeamFeedQuery struct {
WorkspaceID string `json:"workspace_id,omitempty"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Actor string `json:"actor"`
ActorWorkspaceID string `json:"actor_workspace_id,omitempty"`
ActorProfileID string `json:"actor_profile_id,omitempty"`
Role string `json:"role,omitempty"`
Limit int `json:"limit,omitempty"`
Cursor string `json:"cursor,omitempty"`
}
type TeamFeedResult ¶ added in v0.3.0
type TeamFeedResult struct {
Authorized bool `json:"authorized"`
Decision TeamFeedDecision `json:"decision"`
Reason string `json:"reason,omitempty"`
Entries []TeamFeedEntry `json:"entries"`
NextCursor string `json:"next_cursor,omitempty"`
AuditID int64 `json:"audit_id,omitempty"`
}
type TextEmbeddingProvider ¶ added in v0.3.0
type TextEmbeddingProvider interface {
EmbedText(ctx context.Context, text string) ([]float64, error)
}
TextEmbeddingProvider turns text into deterministic local vectors. It is kept separate from VectorStore so embedding generation and vector storage can be tested, swapped, and audited independently.
type UnsupportedFilterError ¶
type UnsupportedFilterError = searchfilter.UnsupportedFilterError
type UpdateMemoryTool ¶
type UpdateMemoryTool struct {
// contains filtered or unexported fields
}
func NewUpdateMemoryTool ¶
func NewUpdateMemoryTool(store MemoryToolStore) *UpdateMemoryTool
func (UpdateMemoryTool) Description ¶
func (t UpdateMemoryTool) Description() string
func (UpdateMemoryTool) Execute ¶
func (t UpdateMemoryTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (UpdateMemoryTool) Schema ¶
func (t UpdateMemoryTool) Schema() json.RawMessage
func (UpdateMemoryTool) Spec ¶
func (t UpdateMemoryTool) Spec() toolmeta.OperationSpec
type VectorSearchHit ¶
type VectorSearchHit struct {
MemoryID string `json:"memory_id"`
SourceType string `json:"source_type,omitempty"`
Content string `json:"content"`
SessionID string `json:"session_id,omitempty"`
AgentID string `json:"agent_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Importance float64 `json:"importance,omitempty"`
Score float64 `json:"score"`
Metadata map[string]string `json:"metadata,omitempty"`
}
VectorSearchHit is one semantic hit returned by a VectorStore.
type VectorSearchQuery ¶
type VectorSearchQuery struct {
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
Peer string `json:"peer"`
Query string `json:"query"`
SessionKey string `json:"session_key,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
Sources []string `json:"sources,omitempty"`
Limit int `json:"limit,omitempty"`
}
VectorSearchQuery is the host-neutral request passed to an optional VectorStore during recall candidate generation.
type VectorStore ¶
type VectorStore interface {
Search(ctx context.Context, query VectorSearchQuery) ([]VectorSearchHit, error)
}
VectorStore is the optional host-owned semantic retrieval seam. Implementations may use local embeddings, an in-process ANN index, or deterministic fakes in tests; Goncho treats returned hits as semantic evidence and fuses them with lexical/graph recall through the existing RRF scorer.
type VerifiedCodeClaim ¶
type VerifiedCodeContextResult ¶
type VerifiedCodeContextResult struct {
WorkspaceID string `json:"workspace_id"`
Peer string `json:"peer"`
SessionKey string `json:"session_key,omitempty"`
Representation string `json:"representation"`
VerifiedClaims []VerifiedCodeClaim `json:"verified_claims"`
StaleClaims []VerifiedCodeClaim `json:"stale_claims"`
}
type ViewerConclusion ¶ added in v0.3.0
type ViewerConclusion struct {
ID int64 `json:"id"`
WorkspaceID string `json:"workspace_id"`
ProfileID string `json:"profile_id,omitempty"`
PeerID string `json:"peer_id"`
SessionKey string `json:"session_key,omitempty"`
Content string `json:"content"`
Scope string `json:"scope"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
type ViewerCounts ¶ added in v0.3.0
type ViewerCounts struct {
Workspaces int `json:"workspaces"`
Profiles int `json:"profiles"`
Sessions int `json:"sessions"`
Messages int `json:"messages"`
Observations int `json:"observations"`
Conclusions int `json:"conclusions"`
ReviewOpen int `json:"review_open"`
ReviewResolved int `json:"review_resolved"`
}
type ViewerDBInfo ¶ added in v0.3.0
type ViewerDBInfo struct {
Path string `json:"path"`
}
type ViewerReviewQueue ¶ added in v0.3.0
type ViewerReviewQueue struct {
Open int `json:"open"`
Resolved int `json:"resolved"`
LatestOpen []ReviewItem `json:"latest_open"`
}
type ViewerSessionTimeline ¶ added in v0.3.0
type ViewerSessionTimeline struct {
Status string `json:"status"`
ReadOnly bool `json:"read_only"`
WorkspaceID string `json:"workspace_id"`
SessionKey string `json:"session_key"`
Messages []MessageRecord `json:"messages"`
Observations []Observation `json:"observations"`
Summaries []SessionSummary `json:"summaries"`
Events []ViewerTimelineEvent `json:"events"`
GeneratedAt time.Time `json:"generated_at"`
}
type ViewerSnapshot ¶ added in v0.3.0
type ViewerSnapshot struct {
Status string `json:"status"`
ReadOnly bool `json:"read_only"`
WorkspaceID string `json:"workspace_id"`
ObserverPeerID string `json:"observer_peer_id"`
DB ViewerDBInfo `json:"db"`
Counts ViewerCounts `json:"counts"`
LatestObservations []Observation `json:"latest_observations"`
LatestConclusions []ViewerConclusion `json:"latest_conclusions"`
ReviewQueue ViewerReviewQueue `json:"review_queue"`
GeneratedAt time.Time `json:"generated_at"`
}
ViewerSnapshot is the read-only JSON model for Goncho's local viewer API.
type ViewerTimelineEvent ¶ added in v0.3.0
type ViewerTimelineEvent struct {
Type string `json:"type"`
ID string `json:"id"`
AtUnix int64 `json:"at_unix"`
Sequence int `json:"sequence,omitempty"`
Kind string `json:"kind,omitempty"`
Role string `json:"role,omitempty"`
PeerID string `json:"peer_id,omitempty"`
Content string `json:"content,omitempty"`
Source string `json:"source"`
Truncated bool `json:"truncated,omitempty"`
}
type WebhookClock ¶
type WebhookClock = webhookspkg.WebhookClock
type WebhookDeliveryAttempt ¶
type WebhookDeliveryAttempt = webhookspkg.WebhookDeliveryAttempt
type WebhookDeliveryEndpoint ¶
type WebhookDeliveryEndpoint = webhookspkg.WebhookDeliveryEndpoint
type WebhookDeliveryErrorClass ¶
type WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorClass
const ( WebhookDeliveryErrorNone WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorNone WebhookDeliveryErrorHTTPStatus WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorHTTPStatus WebhookDeliveryErrorNetwork WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorNetwork WebhookDeliveryErrorSigning WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorSigning WebhookDeliveryErrorStore WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorStore WebhookDeliveryErrorDisabled WebhookDeliveryErrorClass = webhookspkg.WebhookDeliveryErrorDisabled )
type WebhookDeliveryEvidence ¶
type WebhookDeliveryEvidence = webhookspkg.WebhookDeliveryEvidence
type WebhookDeliveryRequest ¶
type WebhookDeliveryRequest = webhookspkg.WebhookDeliveryRequest
type WebhookDeliveryResult ¶
type WebhookDeliveryResult = webhookspkg.WebhookDeliveryResult
type WebhookDeliveryStatus ¶
type WebhookDeliveryStatus = webhookspkg.WebhookDeliveryStatus
const ( WebhookDeliveryDelivered WebhookDeliveryStatus = webhookspkg.WebhookDeliveryDelivered WebhookDeliveryRetryable WebhookDeliveryStatus = webhookspkg.WebhookDeliveryRetryable WebhookDeliveryFailed WebhookDeliveryStatus = webhookspkg.WebhookDeliveryFailed WebhookDeliveryEndpointDisabled WebhookDeliveryStatus = webhookspkg.WebhookDeliveryEndpointDisabled WebhookDeliverySkipped WebhookDeliveryStatus = webhookspkg.WebhookDeliverySkipped )
type WebhookDeliveryStore ¶
type WebhookDeliveryStore = webhookspkg.WebhookDeliveryStore
type WebhookDeliveryWorker ¶
type WebhookDeliveryWorker = webhookspkg.WebhookDeliveryWorker
type WebhookEndpoint ¶
type WebhookEndpoint = webhookspkg.WebhookEndpoint
type WebhookEndpointCreateParams ¶
type WebhookEndpointCreateParams = webhookspkg.WebhookEndpointCreateParams
type WebhookEndpointCreateResult ¶
type WebhookEndpointCreateResult = webhookspkg.WebhookEndpointCreateResult
type WebhookEvent ¶
type WebhookEvent = webhookspkg.WebhookEvent
func NewQueueEmptyWebhookEvent ¶
func NewQueueEmptyWebhookEvent(params QueueEmptyWebhookEventParams) (WebhookEvent, error)
func NewTestWebhookEvent ¶
func NewTestWebhookEvent(workspaceID string) (WebhookEvent, error)
type WebhookEventType ¶
type WebhookEventType = webhookspkg.WebhookEventType
const ( WebhookEventQueueEmpty WebhookEventType = webhookspkg.WebhookEventQueueEmpty WebhookEventTest WebhookEventType = webhookspkg.WebhookEventTest )
type WebhookHTTPClient ¶
type WebhookHTTPClient = webhookspkg.WebhookHTTPClient
type WebhookHTTPRequest ¶
type WebhookHTTPRequest = webhookspkg.WebhookHTTPRequest
type WebhookHTTPResponse ¶
type WebhookHTTPResponse = webhookspkg.WebhookHTTPResponse
type WorkspaceDecision ¶
func ResolveWorkspace ¶
func ResolveWorkspace(req WorkspaceRequest) (WorkspaceDecision, error)
type WorkspaceDeletionResult ¶
type WorkspaceDeletionResult struct {
WorkspaceID string `json:"workspace_id"`
MessagesDeleted int64 `json:"messages_deleted"`
PeerCardsDeleted int64 `json:"peer_cards_deleted"`
ConclusionsDeleted int64 `json:"conclusions_deleted"`
SummariesDeleted int64 `json:"summaries_deleted"`
DreamsDeleted int64 `json:"dreams_deleted"`
}
type WorkspaceRequest ¶
type WorkspaceRequest struct {
Strategy WorkspaceStrategy
WorkspaceID string
UserID string
}
type WorkspaceStrategy ¶
type WorkspaceStrategy string
const ( WorkspaceStrategyDefault WorkspaceStrategy = "default" WorkspaceStrategyHardIsolation WorkspaceStrategy = "hard_isolation" WorkspaceStrategyPerUser WorkspaceStrategy = "per_user" )
Source Files
¶
- action_graph.go
- action_leases.go
- action_signal_receipts.go
- audit.go
- code_claim_verification.go
- compat_harness.go
- conclusion_module.go
- contradiction_detector.go
- cross_session.go
- decay.go
- diagnostics.go
- doc.go
- dream_compression.go
- dream_extraction.go
- dream_scheduler.go
- drift_anchor.go
- eval_feedback.go
- file_import.go
- filesystem_watcher.go
- filter.go
- four_tier_consolidation.go
- goncho_public_tools.go
- goncho_recall_tool_output.go
- hook_capture.go
- image_memory.go
- importance_scorer.go
- lifecycle_module.go
- local_markdown_memory.go
- local_vector_index.go
- memory.go
- memory_annotations.go
- memory_extraction_proposals.go
- memory_facade.go
- memory_resources.go
- memory_slots.go
- memory_tools.go
- memory_v1_contract.go
- metaanalysis_goal.go
- migrations.go
- observations.go
- portable_export.go
- proof_matrix.go
- provider_resilience.go
- public_tools_restart_e2e.go
- quarantine.go
- query_expansion.go
- recall_annotation_graph.go
- recall_benchmark.go
- recall_benchmark_fixtures.go
- recall_diagnostics.go
- recall_graph.go
- recall_ir.go
- recall_pipeline.go
- recall_projector.go
- recall_query_decomposition.go
- recall_replay.go
- retention_policy.go
- retrieval_module.go
- review.go
- review_tool.go
- search_fact_intent.go
- search_rank.go
- server_mode_security.go
- service.go
- session_summary.go
- skill_learning_proposals.go
- skill_outcomes.go
- snapshots.go
- sql.go
- streaming_chat_persistence.go
- strings_helpers.go
- team_feed.go
- topology.go
- types.go
- vector_store.go
- viewer.go
- webhook_delivery.go
- webhooks.go
- workspace_facade.go