outputfiles

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package outputfiles creates the files pi writes so the model can use output it was not shown in full: the full text of truncated tool output, binary MCP resources and images shown by codemode scripts. Every output file is created here, in the OS temp directory.

Ports packages/coding-agent/src/utils/output-files.ts

Index

Constants

View Source
const Mode os.FileMode = 0o600

Mode is the permission of every output file. Output can carry private data, so only the user may read the files.

Variables

This section is empty.

Functions

func CreateStream

func CreateStream(prefix, extension string) (string, *os.File, error)

CreateStream opens a new output file for streamed output. Like Node's write stream, which reports an open failure asynchronously, it returns the path even when the file could not be created: the error accompanies a nil file and the caller keeps the path.

func WriteFile

func WriteFile(prefix, extension string, data []byte) (string, error)

WriteFile writes data to a new output file and returns its path. A failure returns an empty path and the error as Node reports it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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