Documentation
¶
Index ¶
Constants ¶
const MaxArtifactFrameBytes = 64 << 20
MaxArtifactFrameBytes caps the artifact a single panel frame carries, the binding's inbound frame limit.
Variables ¶
var ErrArtifactName = errors.New("an artifact name is one file name under the session's artifacts dir")
ErrArtifactName refuses a name that is not one file directly under the session's artifacts dir.
Functions ¶
func ArtifactPath ¶ added in v0.241.0
ArtifactPath is the path of the artifact name under dir, refusing a name that names anything but one file directly under it.
func ParseRemoteURL ¶
ParseRemoteURL extracts "org/repo" from an https or scp-style ssh git remote URL, returning "" when it does not match either form.
func Path ¶
func Path() string
Path returns the absolute working directory, cached for the process lifetime. It identifies the project in conversation metadata and drives the per-project storage slug; an empty result means the cwd could not be resolved (process runs without a filesystem context).
func RemoteName ¶
func RemoteName() string
RemoteName returns the "org/repo" name parsed from the origin remote URL, or "" when there is no repo/remote or the URL is unparsable.
Types ¶
type Artifact ¶ added in v0.241.0
type Artifact struct {
Name string `json:"name"`
Size int64 `json:"size"`
ModifiedAt time.Time `json:"modified_at"`
}
Artifact is one file a session saved under its artifacts dir.
func ListArtifacts ¶ added in v0.241.0
ListArtifacts lists the files directly under dir, newest first. A missing dir lists as empty, since a session may have saved nothing yet.