drafts

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package drafts is the Drafts module: documents (prose, code, plans) the owner and the agent work on together. Every save is a revision, any two revisions can be compared, and either side can pin a mark (a comment, a question, a suggested change) to a passage; the marks are the core's, so they look and work the same as everywhere else in the app.

The agent writes a draft only against the revision it read (expect_rev), so it never silently overwrites the owner's edits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Draft

type Draft struct {
	ID    string `json:"id"`
	Title string `json:"title"`
	// Lang is markdown, text or a programming language.
	Lang    string `json:"lang"`
	Body    string `json:"body,omitempty"`
	Rev     int    `json:"rev"`
	Created string `json:"created"`
	Updated string `json:"updated"`
	// Lines is the body's line count, in lists.
	Lines int `json:"lines,omitempty"`
}

Draft is one document the owner and the agent work on together.

type Line

type Line struct {
	Op   string `json:"op"`
	Text string `json:"text"`
}

Line is one line of a comparison: " " kept, "-" removed, "+" added.

type Revision

type Revision struct {
	Rev     int    `json:"rev"`
	Body    string `json:"body,omitempty"`
	Author  string `json:"author"`
	Summary string `json:"summary,omitempty"`
	Created string `json:"created"`
}

Revision is one saved state of a draft.

Jump to

Keyboard shortcuts

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