carriers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package carriers recognizes a small, versioned catalog of canonical structured plan shapes. Matching is based on explicit tool/item shape; no provider or agent brand is inferred from surrounding text.

Index

Constants

View Source
const (
	CodexUpdatePlanV1   = "codex.update_plan.v1"
	OpenCodeTodoV1      = "opencode.todo.v1"
	ClineTaskProgressV1 = "cline.task_progress.v1"
)

Variables

View Source
var ErrMalformedCarrier = errors.New("carriers: malformed structured plan carrier")

Functions

func Apply

func Apply(previous capsule.Envelope, update Update) (capsule.Envelope, error)

Apply merges a recognized deterministic plan into a parent capsule. The parent binding and compare-and-merge revision are supplied by the capsule, so a carrier cannot move state to a detached child branch.

Types

type Update

type Update struct {
	RuleID string
	Plan   capsule.Plan
}

func Extract

func Extract(data []byte) (update Update, matched bool, err error)

Extract recognizes a canonical tool-call/item JSON value. matched is false for ordinary or near-miss items; malformed input for a recognized tool name returns an error so callers can count and discard it deterministically.

Jump to

Keyboard shortcuts

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