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 / telemetry / tests / fixtures / session-options.ts
29 lines · 936 BRaw
1import type {
2 HttpResponse,
3 SessionAuthorization,
4 SessionVersion,
5} from 'claude-code'
6
7import type { PolicyOption } from './policy-option.js'
8
9/**
10 * How a test's session differs from the plain one.
11 *
12 * What `authorize` and the ingest answer in turn (`refused`: the store will
13 * not open; the last repeats), the managed policy (`unreadable` when it
14 * cannot be read), and the machine's files, markers and probe output.
15 */
16export type SessionOptions = {
17 readonly authorizations?: readonly (SessionAuthorization | 'refused')[]
18 readonly answers?: readonly HttpResponse[]
19 readonly policy?: PolicyOption
20 readonly files?: Readonly<Record<string, string>>
21 readonly existing?: readonly string[]
22 readonly probeOutput?: string
23
24 /**
25 * What `$.session.version()` answers; `unanswered` leaves nothing beneath
26 * it, as under an engine without the read.
27 */
28 readonly engineVersion?: SessionVersion | 'unanswered'
29}