paths

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package paths centralizes the on-disk paths the shim and broker share. Every path is overridable by an env var so tests can isolate to a temp dir.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodexDir

func CodexDir() (string, error)

CodexDir returns the directory containing managed Codex peer state.

func CodexLock

func CodexLock(peer string) (string, error)

CodexLock returns the lifetime lock path for a managed Codex peer.

func CodexState

func CodexState(peer string) (string, error)

CodexState returns the managed state path for peer. Callers must validate peer before using it as a path component.

func CodexThreadLock added in v0.2.2

func CodexThreadLock(codexHome, threadID string) (string, error)

CodexThreadLock returns a process-lifetime lock path shared by every Intercom peer that targets the same Codex thread. The lock lives below CODEX_HOME so separate Intercom runtime directories use the same ownership namespace. Codex itself does not honor this lock; it prevents only two Intercom controllers from managing one thread concurrently.

func Dir

func Dir() (string, error)

Dir returns the runtime directory (~/.claude-intercom by default). It is created with mode 0700 if missing. The first non-nil error short- circuits subsequent helper calls in the same process.

func Lock

func Lock() (string, error)

Lock returns the path of the broker's startup lock file. Always derived from Socket() (with .lock appended) so a custom socket path moves the lock file alongside it.

func Log

func Log() (string, error)

Log returns the broker's log file path. Honors $INTERCOM_BROKER_LOG if set; otherwise <Dir>/broker.log.

func Socket

func Socket() (string, error)

Socket returns the broker's Unix socket path. Honors $INTERCOM_SOCKET if set; otherwise <Dir>/broker.sock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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