ledger

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultApplied   = "applied"
	ResultBlocked   = "blocked"
	ResultAttempted = "attempted"
	ResultCompleted = "completed"
	ResultFailed    = "failed"
	ResultSkipped   = "skipped"
)
View Source
const (
	DecisionApproved         = "approved"
	DecisionAllowedWithProof = "allowed_with_proof"
	DecisionApprovalRequired = "approval_required"
)
View Source
const (
	ActionBeliefDecay                    = "belief_decay"
	ActionCorrectionApplication          = "correction_application"
	ActionCorrectionCreation             = "correction_creation"
	ActionFallbackActivation             = "fallback_activation"
	ActionHeartbeatCadenceRun            = "heartbeat_cadence_run"
	ActionHeartbeatSchedulerDecision     = "heartbeat_scheduler_decision"
	ActionMaintenanceApply               = "maintenance_apply"
	ActionMemorySearch                   = "memory_search"
	ActionMemoryArchival                 = "memory_archival"
	ActionMemoryDecay                    = "memory_decay"
	ActionMemoryEpisodeCreation          = "memory_episode_creation"
	ActionMemoryFactCreation             = "memory_fact_creation"
	ActionMemoryEvaluation               = "memory_evaluation"
	ActionMemoryCarrierAudit             = "memory_carrier_audit"
	ActionMemoryCarrierProbe             = "memory_carrier_probe"
	ActionMemoryPortabilityAudit         = "memory_portability_audit"
	ActionMemoryPortabilityArchive       = "memory_portability_archive"
	ActionMemoryPortabilityQueue         = "memory_portability_queue"
	ActionMemoryReadinessAudit           = "memory_readiness_audit"
	ActionMemoryTrialRun                 = "memory_trial_run"
	ActionMemoryVerification             = "memory_verification"
	ActionMemoryStateManifestVerify      = "memory_state_manifest_verify"
	ActionMemoryStateManifestWrite       = "memory_state_manifest_write"
	ActionMemoryRecall                   = "memory_recall"
	ActionMemoryStore                    = "memory_store"
	ActionMemoryStructuralLinkTransition = "memory_structural_link_transition"
	ActionMemoryTemporalTransition       = "memory_temporal_transition"
	ActionMemoryProtectionTransition     = "memory_protection_transition"
	ActionMemoryTemperatureTransition    = "memory_temperature_transition"
	ActionModelPromotion                 = "model_promotion"
	ActionOfficeDispatchCompletion       = "office_dispatch_completion"
	ActionOfficeDispatchStart            = "office_dispatch_start"
	ActionAutoskillProposal              = "autoskill_proposal"
	ActionHarnessLabMutation             = "harness_lab_mutation"
	ActionPolicyTuningApply              = "policy_tuning_apply"
	ActionPromotionMerge                 = "promotion_merge"
	ActionPromotionRejection             = "promotion_rejection"
	ActionReviewCandidateGeneration      = "review_candidate_generation"
	ActionReviewCandidateResolution      = "review_candidate_resolution"
	ActionRouteFailure                   = "route_failure"
	ActionRouteSelection                 = "route_selection"
	ActionSelfRepairExecution            = "self_repair_execution"
	ActionSelfRepairSelection            = "self_repair_selection"
	ActionSelfRepairVerification         = "self_repair_verification"
	ActionSelfRepairWorkItemCreate       = "self_repair_work_item_create"
	ActionTrustStageTransition           = "trust_stage_transition"
	ActionTrustStageTransitionRequest    = "trust_stage_transition_request"
	ActionVaultSearch                    = "vault_search"
	ActionWraithIngressCapture           = "wraith_ingress_capture"
	ActionWraithIngressProcess           = "wraith_ingress_process"
)
View Source
const (
	ScopeApprovedMaintenanceApply      = "approved_maintenance_apply"
	ScopeApprovedTuningApplication     = "approved_tuning_application"
	ScopeAutoskillProposal             = "autoskill_proposal"
	ScopeCandidateBootstrapGen         = "candidate_bootstrap_generation"
	ScopeCandidateCorrectionReview     = "candidate_correction_review"
	ScopeCandidateContradictionGen     = "candidate_contradiction_generation"
	ScopeCandidateFactTemporalReview   = "candidate_fact_temporal_review"
	ScopeCandidateElderMemoryReview    = "candidate_elder_memory_review"
	ScopeCandidateHotMemoryReview      = "candidate_hot_memory_review"
	ScopeCandidateStructuralLinkReview = "candidate_structural_link_review"
	ScopeCandidateMergeGen             = "candidate_merge_generation"
	ScopeManualModelPromotion          = "manual_model_promotion"
	ScopeOperatorMemoryStore           = "operator_memory_store"
	ScopeOperatorMemoryReview          = "operator_memory_review"
	ScopeOperatorPRMerge               = "operator_pr_merge"
	ScopeOperatorPRReject              = "operator_pr_reject"
	ScopeOperatorTrustStageChange      = "operator_trust_stage_change"
	ScopeHarnessLabMutation            = "harness_lab_mutation"
	ScopeRuntimeMemorySearch           = "runtime_memory_search"
	ScopeRuntimeMemoryStore            = "runtime_memory_store"
	ScopeRuntimeMemoryEvaluation       = "runtime_memory_evaluation"
	ScopeRuntimeMemoryCarrierAudit     = "runtime_memory_carrier_audit"
	ScopeRuntimeMemoryCarrierProbe     = "runtime_memory_carrier_probe"
	ScopeRuntimeMemoryPortability      = "runtime_memory_portability"
	ScopeRuntimeMemoryReadiness        = "runtime_memory_readiness"
	ScopeRuntimeMemoryTrials           = "runtime_memory_trials"
	ScopeRuntimeMemoryVerification     = "runtime_memory_verification"
	ScopeRuntimeMemoryStateManifest    = "runtime_memory_state_manifest"
	ScopeRuntimeFallbackActivation     = "runtime_fallback_activation"
	ScopeRuntimeOfficeDispatch         = "runtime_office_dispatch"
	ScopeRuntimeRouteFailure           = "runtime_route_failure"
	ScopeRuntimeRouteSelection         = "runtime_route_selection"
	ScopeRuntimeSelfRepair             = "runtime_self_repair"
	ScopeRuntimeVaultSearch            = "runtime_vault_search"
	ScopeScheduledBeliefDecay          = "scheduled_belief_decay"
	ScopeScheduledCadenceExecution     = "scheduled_cadence_execution"
	ScopeScheduledFactArchival         = "scheduled_fact_archival"
	ScopeScheduledFactDecay            = "scheduled_fact_decay"
	ScopeSearchCorrectionApplication   = "search_correction_application"
	ScopeSearchCorrectionCreation      = "search_correction_creation"
	ScopeWraithIngressCapture          = "wraith_ingress_capture"
	ScopeWraithIngressProcess          = "wraith_ingress_process"
)

Variables

This section is empty.

Functions

func Append

func Append(vaultDir string, r Record) error

Append writes a ledger record to an append-only JSONL file rooted under the vault.

func NewOperationID

func NewOperationID(prefix string) string

NewOperationID creates a stable, machine-usable identifier for a consequential action lifecycle.

Types

type Record

type Record struct {
	OperationID        string                 `json:"operation_id"`
	Timestamp          string                 `json:"timestamp"`
	Office             string                 `json:"office"`
	Subsystem          string                 `json:"subsystem,omitempty"`
	AuthorityScope     string                 `json:"authority_scope,omitempty"`
	ActionClass        string                 `json:"action_class"`
	TargetDomain       string                 `json:"target_domain,omitempty"`
	ResultStatus       string                 `json:"result_status"`
	Decision           string                 `json:"decision,omitempty"`
	SuggestedTransform string                 `json:"suggested_transformation,omitempty"`
	SideEffects        []string               `json:"side_effects,omitempty"`
	ProofRefs          []string               `json:"proof_refs,omitempty"`
	Signature          signature.Signature    `json:"signature"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
}

Record is the first operation-ledger schema for consequential actions.

func Recent

func Recent(vaultDir string, limit int, keep func(Record) bool) ([]Record, error)

Recent returns the newest ledger records that match the predicate.

Jump to

Keyboard shortcuts

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