Skip to main content
Every plugin must implement these subcommands.

Required Commands

info

Returns metadata and declares which optional capabilities your plugin supports.

detect

Returns whether the agent is available in the current environment. Return {"present": false} if the agent’s dependencies are not met — the CLI will skip enabling the agent.

get-session-id

Extracts a session ID from a hook input event. stdin: HookInput JSON

get-session-dir --repo-path <path>

Returns where agent sessions are stored.

resolve-session-file --session-dir <dir> --session-id <id>

Resolves the session file path from a session directory and ID.

read-session

Reads session data from a hook input event. stdin: HookInput JSON stdout: AgentSession JSON

write-session

Persists session data to disk. The plugin is responsible for choosing the storage location and format. stdin: AgentSession JSON Exit 0 on success.

read-transcript --session-ref <path>

Reads a transcript file and returns its raw bytes on stdout.

chunk-transcript --max-size <n>

Splits a transcript (raw bytes on stdin) into chunks.

reassemble-transcript

Reassembles chunks back into a transcript. Called during entire checkpoint rewind to reconstruct transcript data from stored chunks. stdin:
stdout: Raw transcript bytes.

format-resume-command --session-id <id>

Returns the command a user would run to resume a session.

Optional Capabilities

Set capabilities to true in your info response to enable these. The CLI will never call subcommands for capabilities you don’t declare.

hooks

Manage agent lifecycle hooks for Entire integration.

transcript_analyzer

Extract data from agent transcripts.

transcript_preparer

token_calculator

Output:
Only input_tokens and output_tokens are required. Other fields default to 0.

text_generator

hook_response_writer

subagent_aware_extractor

For agents that spawn subagents.