spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / beneath / beneath.ts
43 lines · 1.2 KBRaw
1import type { SessionMessage, Settings } from 'claude-code'
2
3/**
4 * What the world beneath a repository session holds and answers besides
5 * git.
6 *
7 * The store, the settings, the environment, the transcript, whether a pane
8 * is seated, whether a hunks read is refused.
9 */
10export type Beneath = {
11 /**
12 * What the plugin's store holds at the start; nothing when not given.
13 */
14 stored?: Readonly<Record<string, unknown>>
15
16 /**
17 * What `$.settings.read` answers; empty when not given.
18 */
19 settings?: Settings
20
21 /**
22 * The variables `$.env.get` answers from; none set when not given.
23 */
24 env?: Readonly<Record<string, string>>
25
26 /**
27 * What `$.session.messages` answers each time it is read, as a resumed
28 * session's transcript already holds turns; empty when not given.
29 */
30 messages?: () => readonly SessionMessage[]
31
32 /**
33 * Whether an open made now is left waiting undrawn (LEFT_WAITING), as an
34 * engine leaves an unasked open on a narrow terminal; placed when not given.
35 */
36 isLeftWaiting?: () => boolean
37
38 /**
39 * Why a hunks read asked now is refused, as the host refuses a git that
40 * outran its timeout; answered from the script when null or not given.
41 */
42 hunksRefusal?: () => string | null
43}