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
35 lines · 1013 BRaw
1import type { SessionMessage, Settings } from 'claude-code'
2
3/**
4 * What the world beneath a repository session holds and answers besides
5 * git: the store, the settings, the environment, the transcript, whether a
6 * pane is seated.
7 */
8export type Beneath = {
9 /**
10 * What the plugin's store holds at the start; nothing when not given.
11 */
12 stored?: Readonly<Record<string, unknown>>
13
14 /**
15 * What `$.settings.read` answers; empty when not given.
16 */
17 settings?: Settings
18
19 /**
20 * The variables `$.env.get` answers from; none set when not given.
21 */
22 env?: Readonly<Record<string, string>>
23
24 /**
25 * What `$.session.messages` answers each time it is read, as a resumed
26 * session's transcript already holds turns; empty when not given.
27 */
28 messages?: () => readonly SessionMessage[]
29
30 /**
31 * Whether an open made now is left waiting undrawn (LEFT_WAITING), as an
32 * engine leaves an unasked open on a narrow terminal; placed when not given.
33 */
34 isLeftWaiting?: () => boolean
35}