dmdelivery

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 30 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

Index

Constants

View Source
const (
	LiveWaitSeconds    = 300
	LiveWaitMaxSeconds = 30 * 60
)

Live owner wait windows, one await budget and the ceiling past which a runner reports pending and exits

Variables

This section is empty.

Functions

func AdmitLiveDM

func AdmitLiveDM(ctx context.Context, profileHome, dmFile string, author *jsonutil.Object) (map[string]any, error)

Pins the intent beside a DM file before admission, a retry inspecting the pinned owner and message only

func DMDeliveryID

func DMDeliveryID(dmFile string) (string, error)

One delivery id per DM file, the sha256 of its resolved path shared by ack, intent and every retry

func DeliveryMain

func DeliveryMain(ctx context.Context, args []string, stdout, stderr io.Writer) int

Exit status of the runner for the argv the delivery command builds, malformed argv 2

func DispatchEntry

func DispatchEntry(ctx context.Context, exit func(int))

Runs the DM runner and exits when argv carries its entry word, the script run of tools/bot_mode_dm.py

func ExcText

func ExcText(err error) string

Text a delivery answer quotes for a failure, an operating system error as its reason and path

func LiveIntentFile

func LiveIntentFile(dmFile string) string

Pinned live delivery intent beside a DM file, the name the cache sweep globs

func LiveOutcomeUnknown

func LiveOutcomeUnknown(dmFile, cause string) (string, error)

Runner answer when a live admission may have happened but its outcome is unknown

func SettledNoSend

func SettledNoSend(dmFile string, exc LiveTargetError) (string, error)

Drops the intent and payload of a definite no send, the unknown outcome when either file stays

func UnavailablePayload

func UnavailablePayload(dmFile string, exc LiveTargetError) (string, error)

Runner and tool answer to a definite no send, reason and delivery id with the safe to resend text

func UnlinkDMFile

func UnlinkDMFile(path string)

Removes a DM file or intent, every OS error swallowed

func WaitLiveDM

func WaitLiveDM(ctx context.Context, stdout io.Writer, home, deliveryID, dmFile string) (int, error)

Bounded wait on a live admission printing its outcome, exit 0 for settled or still pending and 1 otherwise

func WriteDMFile

func WriteDMFile(content string) (string, error)

Sweeps stale payloads and stores a message in a fresh private file, never inline shell text

Types

type LiveTargetError

type LiveTargetError interface {
	error
	Reason() string
	Resend() string
}

Definite no send refusal of a live target with its typed reason and when the sender may resend

type LiveTargetHeldError

type LiveTargetHeldError struct{ LiveTargetUnavailableError }

Owner refusal under another session writer that settled this delivery id as never sent

func (*LiveTargetHeldError) Reason

func (e *LiveTargetHeldError) Reason() string

func (*LiveTargetHeldError) Resend

func (e *LiveTargetHeldError) Resend() string

type LiveTargetUnavailableError

type LiveTargetUnavailableError struct{ Msg string }

Canonical Bot Chat owner unreachable with nothing admitted, a definite no send the sender may retry

func (*LiveTargetUnavailableError) Error

func (*LiveTargetUnavailableError) Reason

func (e *LiveTargetUnavailableError) Reason() string

func (*LiveTargetUnavailableError) Resend

func (e *LiveTargetUnavailableError) Resend() string

Jump to

Keyboard shortcuts

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