Documentation
¶
Overview ¶
Package cairnline exposes the embeddable project coordination core.
The root package is the public API intended for applications such as Hecate. Concrete storage internals remain in internal packages; NewMCPServer exposes the MCP protocol server so an embedding host can mount Cairnline's tool and resource surface on its own transport.
Index ¶
- Constants
- Variables
- func ClassifyErrorCode(err error) string
- func NewSQLiteService(ctx context.Context, path string) (*Service, *SQLiteStore, error)
- type Artifact
- type Assignment
- type AssignmentCompatibilityFilter
- type AssignmentContext
- type AssignmentLaunchPacket
- type AssistantAction
- type AssistantActionResult
- type AssistantApplyAttempt
- type AssistantApplyResult
- type AssistantProposal
- type AssistantProposalRecord
- type AssistantTarget
- type DesiredAgent
- type Evidence
- type ExecutionRef
- type Handoff
- type MCPServer
- type MemoryCandidate
- type MemoryCandidateFilter
- type MemoryCandidatePromotion
- type MemoryCandidateSourceRef
- type MemoryEntry
- type MemoryStore
- type Project
- type ProjectActivity
- type ProjectActivityBuckets
- type ProjectActivityCounts
- type ProjectActivityItem
- type ProjectHealth
- type ProjectHealthAttentionItem
- type ProjectHealthSummary
- type ProjectOperationItem
- type ProjectOperationsBrief
- type ProjectOperationsCounts
- type ProjectSetupReadiness
- type ProjectSetupReadinessAction
- type ProjectSetupReadinessCheck
- type ProjectSetupReadinessSummary
- type ProjectSkill
- type RequiredPermissions
- type Review
- type ReviewFollowUpReadiness
- type Role
- type Root
- type SQLiteStore
- type Service
- type Snapshot
- type Source
- type Store
- type WorkItem
- type WorkItemCloseoutReadiness
Constants ¶
const ( SnapshotVersion = core.SnapshotVersion WorkStatusReady = core.WorkStatusReady WorkStatusDone = core.WorkStatusDone PriorityNormal = core.PriorityNormal ExecutionManual = core.ExecutionManual ExecutionMCPPull = core.ExecutionMCPPull ExecutionExternalAdapter = core.ExecutionExternalAdapter ExecutionOrchestrated = core.ExecutionOrchestrated AssignmentQueued = core.AssignmentQueued AssignmentClaimed = core.AssignmentClaimed AssignmentRunning = core.AssignmentRunning AssignmentAwaitingApproval = core.AssignmentAwaitingApproval AssignmentReview = core.AssignmentReview AssignmentCompleted = core.AssignmentCompleted AssignmentFailed = core.AssignmentFailed AssignmentCancelled = core.AssignmentCancelled DesiredAgentAny = core.DesiredAgentAny SkillFormatMarkdown = core.SkillFormatMarkdown SkillStatusAvailable = core.SkillStatusAvailable SkillStatusMissing = core.SkillStatusMissing SkillStatusInvalid = core.SkillStatusInvalid SkillStatusConflict = core.SkillStatusConflict SkillTrustWorkspace = core.SkillTrustWorkspace SkillPathAgents = core.SkillPathAgents SkillPathHecate = core.SkillPathHecate SkillPathCairnline = core.SkillPathCairnline SkillPathClaude = core.SkillPathClaude SkillPathGemini = core.SkillPathGemini EvidenceTrustOperator = core.EvidenceTrustOperator ReviewVerdictApproved = core.ReviewVerdictApproved ReviewVerdictChangesRequested = core.ReviewVerdictChangesRequested ReviewVerdictBlocked = core.ReviewVerdictBlocked ReviewVerdictRisk = core.ReviewVerdictRisk ReviewVerdictPass = core.ReviewVerdictPass ReviewVerdictConcerns = core.ReviewVerdictConcerns ReviewRiskLow = core.ReviewRiskLow ReviewRiskMedium = core.ReviewRiskMedium ReviewRiskHigh = core.ReviewRiskHigh ReviewRiskUnknown = core.ReviewRiskUnknown ReviewStatusRecorded = core.ReviewStatusRecorded HandoffStatusOpen = core.HandoffStatusOpen HandoffStatusAccepted = core.HandoffStatusAccepted HandoffStatusSuperseded = core.HandoffStatusSuperseded HandoffStatusDismissed = core.HandoffStatusDismissed MemoryTrustOperator = core.MemoryTrustOperator MemoryTrustGenerated = core.MemoryTrustGenerated MemorySourceOperator = core.MemorySourceOperator MemorySourceGenerated = core.MemorySourceGenerated MemoryCandidatePending = core.MemoryCandidatePending MemoryCandidatePromoted = core.MemoryCandidatePromoted MemoryCandidateRejected = core.MemoryCandidateRejected MemoryCandidateProposed = core.MemoryCandidateProposed ProjectOperationsStatusClear = core.ProjectOperationsStatusClear ProjectOperationsStatusAttention = core.ProjectOperationsStatusAttention ProjectSetupStatusReady = core.ProjectSetupStatusReady ProjectSetupStatusTodo = core.ProjectSetupStatusTodo ProjectSetupStatusOptional = core.ProjectSetupStatusOptional ProjectSetupActionSetupProject = core.ProjectSetupActionSetupProject ProjectSetupActionCreateWorkItem = core.ProjectSetupActionCreateWorkItem ProjectSetupActionUpdateProject = core.ProjectSetupActionUpdateProject ProjectSetupActionManageContext = core.ProjectSetupActionManageContext ProjectSetupActionManageRoles = core.ProjectSetupActionManageRoles ProjectHealthStatusClear = core.ProjectHealthStatusClear ProjectHealthStatusAttention = core.ProjectHealthStatusAttention AssistantProposalSourceAPI = core.AssistantProposalSourceAPI AssistantProposalSourceAssistant = core.AssistantProposalSourceAssistant AssistantProposalStatusProposed = core.AssistantProposalStatusProposed AssistantProposalStatusNeedsConfirm = core.AssistantProposalStatusNeedsConfirm AssistantProposalStatusApplied = core.AssistantProposalStatusApplied AssistantProposalStatusPartial = core.AssistantProposalStatusPartial AssistantProposalStatusRejected = core.AssistantProposalStatusRejected AssistantActionCreateProject = core.AssistantActionCreateProject AssistantActionUpdateProject = core.AssistantActionUpdateProject AssistantActionAttachProjectRoot = core.AssistantActionAttachProjectRoot AssistantActionRemoveProjectRoot = core.AssistantActionRemoveProjectRoot AssistantActionSetProjectDefaults = core.AssistantActionSetProjectDefaults AssistantActionCreateRole = core.AssistantActionCreateRole AssistantActionUpdateRole = core.AssistantActionUpdateRole AssistantActionCreateWorkItem = core.AssistantActionCreateWorkItem AssistantActionUpdateWorkItem = core.AssistantActionUpdateWorkItem AssistantActionCreateAssignment = core.AssistantActionCreateAssignment AssistantActionCreateEvidence = core.AssistantActionCreateEvidence AssistantActionCreateReview = core.AssistantActionCreateReview AssistantActionCreateHandoff = core.AssistantActionCreateHandoff AssistantActionUpdateHandoff = core.AssistantActionUpdateHandoff AssistantActionCreateMemoryCandidate = core.AssistantActionCreateMemoryCandidate AssistantApplyStatusApplied = core.AssistantApplyStatusApplied AssistantApplyStatusNeedsConfirm = core.AssistantApplyStatusNeedsConfirm AssistantApplyStatusPartial = core.AssistantApplyStatusPartial AssistantApplyStatusRejected = core.AssistantApplyStatusRejected ProjectOperationKindAssignment = core.ProjectOperationKindAssignment ProjectOperationKindCloseoutReady = core.ProjectOperationKindCloseoutReady ProjectOperationKindHandoff = core.ProjectOperationKindHandoff ProjectOperationKindMemoryCandidate = core.ProjectOperationKindMemoryCandidate ProjectOperationKindMissingEvidence = core.ProjectOperationKindMissingEvidence ProjectOperationKindReviewFollowUp = core.ProjectOperationKindReviewFollowUp ProjectOperationKindProjectSetup = core.ProjectOperationKindProjectSetup ProjectOperationKindSkill = core.ProjectOperationKindSkill ProjectOperationKindWorkItem = core.ProjectOperationKindWorkItem ProjectOperationSeverityBlocked = core.ProjectOperationSeverityBlocked ProjectOperationSeverityAction = core.ProjectOperationSeverityAction ProjectOperationSeverityActive = core.ProjectOperationSeverityActive ProjectOperationSeverityReady = core.ProjectOperationSeverityReady ProjectOperationSeverityInfo = core.ProjectOperationSeverityInfo ProjectActivityBucketActive = core.ProjectActivityBucketActive ProjectActivityBucketBlocked = core.ProjectActivityBucketBlocked ProjectActivityBucketCompleted = core.ProjectActivityBucketCompleted ProjectActivityBucketOther = core.ProjectActivityBucketOther LaunchPacketKindAssignment = core.LaunchPacketKindAssignment )
const ( // ErrorCodeNotFound reports that a referenced entity does not exist. // Suggested host HTTP status: 404. ErrorCodeNotFound = core.ErrorCodeNotFound // ErrorCodeInvalid reports bad or missing input, including argument-decode // failures and domain validation errors. Suggested host HTTP status: 400. ErrorCodeInvalid = core.ErrorCodeInvalid // ErrorCodeAlreadyExists reports an id or uniqueness collision. // Suggested host HTTP status: 409. ErrorCodeAlreadyExists = core.ErrorCodeAlreadyExists // ErrorCodeConflict reports an invalid state transition or a claim race — // the request was well-formed but conflicts with current state. // Suggested host HTTP status: 409. ErrorCodeConflict = core.ErrorCodeConflict // ErrorCodeInternal is the default for any unexpected, unclassified // server-side failure. Suggested host HTTP status: 500. ErrorCodeInternal = core.ErrorCodeInternal )
Tool-error codes are the stable, machine-readable contract a host places on MCP tool failures. Each code names one class of failure so a host can map it to an HTTP status (or its own error taxonomy) without parsing human prose.
The canonical definitions live in internal/core beside the store sentinels so the MCP server can classify errors without importing the root package (which would form an import cycle). These names are the public surface re-exported for external callers of the cairnline module.
Variables ¶
var ( ErrNotFound = core.ErrNotFound ErrInvalid = core.ErrInvalid ErrDuplicate = core.ErrDuplicate ErrConflict = core.ErrConflict )
Functions ¶
func ClassifyErrorCode ¶
ClassifyErrorCode maps an error to its stable tool-error code by matching the typed store sentinels with errors.Is, so wrapped and joined errors classify correctly. It returns "" for a nil error and ErrorCodeInternal for anything that matches no sentinel. It delegates to internal/core, the canonical home of the classification logic.
func NewSQLiteService ¶
Types ¶
type Assignment ¶
type Assignment = core.Assignment
type AssignmentCompatibilityFilter ¶
type AssignmentCompatibilityFilter = core.AssignmentCompatibilityFilter
type AssignmentContext ¶
type AssignmentContext = core.AssignmentContext
type AssignmentLaunchPacket ¶
type AssignmentLaunchPacket = core.AssignmentLaunchPacket
type AssistantAction ¶
type AssistantAction = core.AssistantAction
type AssistantActionResult ¶
type AssistantActionResult = core.AssistantActionResult
type AssistantApplyAttempt ¶
type AssistantApplyAttempt = core.AssistantApplyAttempt
type AssistantApplyResult ¶
type AssistantApplyResult = core.AssistantApplyResult
type AssistantProposal ¶
type AssistantProposal = core.AssistantProposal
type AssistantProposalRecord ¶
type AssistantProposalRecord = core.AssistantProposalRecord
type AssistantTarget ¶
type AssistantTarget = core.AssistantTarget
type DesiredAgent ¶
type DesiredAgent = core.DesiredAgent
type ExecutionRef ¶
type ExecutionRef = core.ExecutionRef
type MCPServer ¶
MCPServer is the MCP protocol server that exposes Cairnline's coordination tools and resources. Build one with NewMCPServer, then mount it on a custom transport via HandleMessage or run the built-in stdio loop with Serve. DeclareExtension advertises optional protocol extensions during initialize.
func NewMCPServer ¶
NewMCPServer builds an MCP server with Cairnline's full tool and resource set registered against service. version is reported in serverInfo and the coordination.capabilities tool.
type MemoryCandidate ¶
type MemoryCandidate = core.MemoryCandidate
type MemoryCandidateFilter ¶
type MemoryCandidateFilter = core.MemoryCandidateFilter
type MemoryCandidatePromotion ¶
type MemoryCandidatePromotion = core.MemoryCandidatePromotion
type MemoryCandidateSourceRef ¶
type MemoryCandidateSourceRef = core.MemoryCandidateSourceRef
type MemoryEntry ¶
type MemoryEntry = core.MemoryEntry
type MemoryStore ¶
type MemoryStore = core.MemoryStore
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
type ProjectActivity ¶
type ProjectActivity = core.ProjectActivity
type ProjectActivityBuckets ¶
type ProjectActivityBuckets = core.ProjectActivityBuckets
type ProjectActivityCounts ¶
type ProjectActivityCounts = core.ProjectActivityCounts
type ProjectActivityItem ¶
type ProjectActivityItem = core.ProjectActivityItem
type ProjectHealth ¶
type ProjectHealth = core.ProjectHealth
type ProjectHealthAttentionItem ¶
type ProjectHealthAttentionItem = core.ProjectHealthAttentionItem
type ProjectHealthSummary ¶
type ProjectHealthSummary = core.ProjectHealthSummary
type ProjectOperationItem ¶
type ProjectOperationItem = core.ProjectOperationItem
type ProjectOperationsBrief ¶
type ProjectOperationsBrief = core.ProjectOperationsBrief
type ProjectOperationsCounts ¶
type ProjectOperationsCounts = core.ProjectOperationsCounts
type ProjectSetupReadiness ¶
type ProjectSetupReadiness = core.ProjectSetupReadiness
type ProjectSetupReadinessAction ¶
type ProjectSetupReadinessAction = core.ProjectSetupReadinessAction
type ProjectSetupReadinessCheck ¶
type ProjectSetupReadinessCheck = core.ProjectSetupReadinessCheck
type ProjectSetupReadinessSummary ¶
type ProjectSetupReadinessSummary = core.ProjectSetupReadinessSummary
type ProjectSkill ¶
type ProjectSkill = core.ProjectSkill
type RequiredPermissions ¶
type RequiredPermissions = core.RequiredPermissions
type ReviewFollowUpReadiness ¶
type ReviewFollowUpReadiness = core.ReviewFollowUpReadiness
type SQLiteStore ¶
type SQLiteStore = sqlitestore.Store
func OpenSQLiteStore ¶
func OpenSQLiteStore(ctx context.Context, path string) (*SQLiteStore, error)
type WorkItemCloseoutReadiness ¶
type WorkItemCloseoutReadiness = core.WorkItemCloseoutReadiness