> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Model

> Data types exchanged between the Entire CLI and agent integrations

## HookInput

Entire passes `HookInput` via stdin to `get-session-id` and `read-session`.

```json theme={null}
{
  "hook_type": "stop",
  "session_id": "abc123",
  "session_ref": "/path/to/transcript.jsonl",
  "timestamp": "2026-01-13T12:00:00Z",
  "user_prompt": "Fix the login bug",
  "tool_name": "Write",
  "tool_use_id": "toolu_abc123",
  "tool_input": {"path": "/src/main.go"},
  "raw_data": {}
}
```

| Field | Type | Required | Description |
| - | - | - | - |
| `hook_type` | string | Yes | `session_start`, `session_end`, `user_prompt_submit`, `stop`, `pre_tool_use`, `post_tool_use` |
| `session_id` | string | Yes | Agent session identifier |
| `session_ref` | string | Yes | Session reference specific to the agent, typically a file path |
| `timestamp` | string | Yes | RFC 3339 timestamp |
| `user_prompt` | string | No | User's prompt text |
| `tool_name` | string | No | Tool name (from tool use hooks) |
| `tool_use_id` | string | No | Tool invocation ID |
| `tool_input` | object | No | Raw tool input JSON |
| `raw_data` | object | No | Extension data specific to the agent |

## AgentSession

Entire passes `AgentSession` to `write-session` and receives it from `read-session`.

```json theme={null}
{
  "session_id": "abc123",
  "agent_name": "myagent",
  "repo_path": "/path/to/repo",
  "session_ref": "/path/to/transcript.jsonl",
  "start_time": "2026-01-13T12:00:00Z",
  "native_data": null,
  "modified_files": ["src/main.go"],
  "new_files": [],
  "deleted_files": []
}
```

| Field | Type | Description |
| - | - | - |
| `session_id` | string | Agent session identifier |
| `agent_name` | string | Agent registry name |
| `repo_path` | string | Absolute path to the repository |
| `session_ref` | string | Path to session in agent's storage |
| `start_time` | string | RFC 3339 timestamp |
| `native_data` | bytes/null | Opaque session content in agent's native format |
| `modified_files` | string\[] | Files modified during the session |
| `new_files` | string\[] | Files created during the session |
| `deleted_files` | string\[] | Files deleted during the session |

## Event

The `parse-hook` subcommand returns this normalized lifecycle event.

```json theme={null}
{
  "type": 3,
  "session_id": "abc123",
  "session_ref": "/path/to/transcript.jsonl",
  "prompt": "Fix the login bug",
  "model": "claude-sonnet-4-20250514",
  "timestamp": "2026-01-13T12:00:00Z"
}
```

**Event types:**

| Value | Name | Description |
| - | - | - |
| 1 | SessionStart | Agent began a session |
| 2 | TurnStart | User submitted a prompt |
| 3 | TurnEnd | Agent finished responding |
| 4 | Compaction | Agent compressed its context window, which triggers a save and offset reset |
| 5 | SessionEnd | Session ended |
| 6 | SubagentStart | Agent spawned a subagent |
| 7 | SubagentEnd | Subagent completed its task |

**Optional event fields:** `previous_session_id`, `session_ref`, `prompt`, `model`, `timestamp`, `tool_use_id`, `subagent_id`, `tool_input`, `subagent_type`, `task_description`, `response_message`, `metadata`.

You must provide `type` and `session_id`.
