GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — claude-code-source-code/src/server/types.ts at main · schelling/claude-code-source-code

Expand file tree

/

types.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
57 lines (51 loc) · 1.43 KB
/

types.ts

Copy path

File metadata and controls

57 lines (51 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import type { ChildProcess } from 'child_process'
import { z } from 'zod/v4'
import { lazySchema } from '../utils/lazySchema.js'
export const connectResponseSchema = lazySchema(() =>
z.object({
session_id: z.string(),
ws_url: z.string(),
work_dir: z.string().optional(),
}),
)
export type ServerConfig = {
port: number
host: string
authToken: string
unix?: string
/** Idle timeout for detached sessions (ms). 0 = never expire. */
idleTimeoutMs?: number
/** Maximum number of concurrent sessions. */
maxSessions?: number
/** Default workspace directory for sessions that don't specify cwd. */
workspace?: string
}
export type SessionState =
| 'starting'
| 'running'
| 'detached'
| 'stopping'
| 'stopped'
export type SessionInfo = {
id: string
status: SessionState
createdAt: number
workDir: string
process: ChildProcess | null
sessionKey?: string
}
/**
* Stable session key → session metadata. Persisted to ~/.claude/server-sessions.json
* so sessions can be resumed across server restarts.
*/
export type SessionIndexEntry = {
/** Server-assigned session ID (matches the subprocess's claude session). */
sessionId: string
/** The claude transcript session ID for --resume. Same as sessionId for direct sessions. */
transcriptSessionId: string
cwd: string
permissionMode?: string
createdAt: number
lastActiveAt: number
}
export type SessionIndex = Record<string, SessionIndexEntry>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.