render

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 The door is a generated view. It is never the source of truth, and never hand-edited.

Index

Constants

This section is empty.

Variables

View Source
var StateKeyRE = regexp.MustCompile(`state:([0-9a-f]{12})`)

StateKeyRE finds the recorded state hash inside a generated view.

Functions

func Auto

func Auto(ws *store.Workspace) bool

Auto keeps the door fresh after anything that changes state. A stale view must never fail a real operation, so failures are swallowed.

func Door

func Door(ws *store.Workspace) string

Door renders .fridge/DOOR.md.

func DoorFrom added in v0.2.2

func DoorFrom(s jsonx.Obj) string

DoorFrom renders one snapshot into one document: body and stamp always agree.

func Drift

func Drift(ws *store.Workspace, text string) (drift bool, found, want string)

Drift is decided by the recorded state key, never by diffing rendered text.

func Snapshot

func Snapshot(ws *store.Workspace) jsonx.Obj

Snapshot is the shape every view renders from.

func StateKey

func StateKey(ws *store.Workspace) string

StateKey hashes everything that matters with wall-clock noise removed, so that --check answers "is this view stale?" and not "did a second pass?".

func StateKeyOf added in v0.2.2

func StateKeyOf(s jsonx.Obj) string

StateKeyOf hashes an already-taken snapshot. Taking a second snapshot for the hash lets a claim appear between the two, and then the stamp certifies a body that was never rendered: --check passes on a door that is already wrong.

func StatusText

func StatusText(ws *store.Workspace, mine string, wide bool) string

StatusText renders the terminal status view.

Types

This section is empty.

Jump to

Keyboard shortcuts

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