[agent/codex:gpt-5.4-mini] Read docs/RFC-STORE.md fully. Find features described in the... #141
3 changed files with 11 additions and 11 deletions
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
var defaultArchiveOutputDirectory = ".core/archive/"
|
||||
|
||||
// CompactOptions selects which completed journal rows move into cold archive
|
||||
// output and where the compressed file is written.
|
||||
// CompactOptions archives completed journal rows before a cutoff time to a
|
||||
// compressed JSONL file.
|
||||
//
|
||||
// Usage example: `options := store.CompactOptions{Before: time.Now().Add(-90 * 24 * time.Hour), Output: "/tmp/archive", Format: "gzip"}`
|
||||
type CompactOptions struct {
|
||||
|
|
|
|||
10
doc.go
10
doc.go
|
|
@ -1,9 +1,9 @@
|
|||
// Package store provides SQLite-backed key-value storage for grouped entries, TTL expiry,
|
||||
// namespace isolation, quota enforcement, reactive change notifications,
|
||||
// workspace journalling, and explicit orphan recovery.
|
||||
// Package store provides SQLite-backed key-value storage for grouped entries,
|
||||
// TTL expiry, namespace isolation, quota enforcement, reactive change
|
||||
// notifications, workspace journalling, and orphan recovery.
|
||||
//
|
||||
// Workspace files are created under `.core/state/` and can be recovered with
|
||||
// `RecoverOrphans(".core/state")`.
|
||||
// Workspace files live under `.core/state/` and can be recovered with
|
||||
// `RecoverOrphans(".core/state/")`.
|
||||
//
|
||||
// Use `store.NewConfigured(store.StoreConfig{...})` when the database path,
|
||||
// journal, and purge interval are already known. Prefer the struct literal
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ func (workspace *Workspace) DatabasePath() string {
|
|||
return workspace.databasePath
|
||||
}
|
||||
|
||||
// Close leaves the SQLite workspace file on disk so a later store instance can
|
||||
// recover it as an orphan and decide whether to Commit or Discard it.
|
||||
// Close keeps the workspace file on disk so `RecoverOrphans(".core/state/")`
|
||||
// can reopen it later.
|
||||
//
|
||||
// Usage example: `if err := workspace.Close(); err != nil { return }; orphans := storeInstance.RecoverOrphans(".core/state"); _ = orphans`
|
||||
func (workspace *Workspace) Close() error {
|
||||
|
|
@ -287,8 +287,8 @@ func (workspace *Workspace) Aggregate() map[string]any {
|
|||
return fields
|
||||
}
|
||||
|
||||
// Commit writes one journal row for the workspace through the shared journal
|
||||
// writer and upserts the summary row in `workspace:NAME`.
|
||||
// Commit writes one completed workspace row to the journal and upserts the
|
||||
// summary entry in `workspace:NAME`.
|
||||
//
|
||||
// Usage example: `result := workspace.Commit(); if !result.OK { return }; fmt.Println(result.Value)`
|
||||
func (workspace *Workspace) Commit() core.Result {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue