Help us shape the future of Go! Take the 2026 Go Developer Survey

codexsummary

package
v0.1.1413 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package codexsummary is the compaction magpie answers Codex with when it compacts a conversation itself (a model of magpie's, or Codex's own models through magpie's accounts), and the message it stands for.

Codex keeps a compaction item whole, encrypted_content and all, in its rollout, and sends it back as it is with every later turn. magpie's is "magpie1:" and the summary in base64, which only magpie reads: sent to OpenAI itself (magpie quit, or disconnected) it is refused as invalid_encrypted_content, and the conversation can't go on (LukeMa on X). What it is read as is the message Codex's own local compaction keeps in its place: its summary prefix, a newline and the summary, as a user message, which Codex knows for a summary (is_summary_message). The gateway sends that in place of the item, and a rollout is made portable by writing it there (sessions.PortCodexRollouts).

Index

Constants

View Source
const Mark = "magpie1:"

Mark begins the encrypted_content of a compaction item magpie made.

View Source
const Prefix = `` /* 399-byte string literal not displayed */

Prefix is Codex's own (Apache-2.0, openai/codex, prompts/templates/compact/summary_prefix.md).

Variables

This section is empty.

Functions

func Encrypted

func Encrypted(summary string) string

Encrypted is the encrypted_content of magpie's compaction item for a summary.

func Message

func Message(encrypted string) (msg map[string]any, ours bool)

Message is what a compaction item's encrypted_content is read as: ours is false for one magpie didn't make (OpenAI's own, left as it is), and msg nil for one of magpie's whose summary can't be read, which is left out.

func UserMessage

func UserMessage(text string) map[string]any

UserMessage is a Responses input message of the user's.

Types

This section is empty.

Jump to

Keyboard shortcuts

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