# pknull/ccworkspace architecture

> Architecture diagram of the GitHub repository pknull/ccworkspace, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pknull/ccworkspace
- Repository: https://github.com/pknull/ccworkspace

## Overview

Inference Inc. is a Godot desktop visualizer for coding-agent sessions. The main workflow is transcript activity detection, event delivery to the office app, and animated agent activity in the virtual office; users can also arrange furniture and enable optional weather or MCP control. The graph includes the embedded terminal extension as an internal layer. README statements support the broad product flows, while sampled source confirms transcript parsing and the PTY/terminal implementation; several app integrations are unsampled, so their links are omitted or marked unverified.

Main entry points: [`agent-office/scripts/Agent.gd`](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/Agent.gd) (Agent Simulation), [`agent-office/addons/godot_xterm/native/src/pty.cpp`](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty.cpp) (PTY Transport), [`agent-office/addons/godot_xterm/native/src/terminal.cpp`](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/terminal.cpp) (Terminal Renderer), [`agent-office/addons/godot_xterm/native/src/register_types.cpp`](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/register_types.cpp) (Extension Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_session["Session Activity"]
  node_watcher["Transcript Watcher<br/>[watcher.py]"]
  node_mcp["MCP Server<br/>[McpServer.gd]"]
  node_tcp["TCP Server<br/>[TCPServer.gd]"]
end

subgraph group_office["Virtual Office"]
  node_manager["Office Manager<br/>[OfficeManager.gd]"]
  node_agents["Agent Simulation<br/>[Agent.gd]"]
  node_agentvisuals["Agent Visuals<br/>[AgentVisuals.gd]"]
  node_furniture["Furniture System"]
  node_navigation["Office Navigation<br/>[NavigationGrid.gd]"]
end

subgraph group_features["Office Features"]
  node_appearance["Agent Appearance"]
  node_mood["Mood and Social<br/>[AgentMood.gd]"]
  node_cat["Office Cat<br/>[OfficeCat.gd]"]
  node_weather["Live Weather<br/>[WeatherSystem.gd]"]
  node_clock["Day Night Cycle<br/>[WallClock.gd]"]
  node_achievements["Achievements"]
  node_settings["Settings"]
end

subgraph group_terminal["Terminal Extension"]
  node_terminalui["Terminal Panel<br/>[terminal_panel.gd]"]
  node_terminal["Terminal Renderer<br/>[terminal.cpp]"]
  node_termheader["Terminal Interface<br/>[terminal.h]"]
  node_pty["PTY Transport<br/>[pty.cpp]"]
  node_ptyheader["PTY Interface<br/>[pty.h]"]
  node_unixpty["Unix PTY Backend<br/>[pty_unix.cpp]"]
  node_unixheader["Unix PTY Interface<br/>[pty_unix.h]"]
  node_winpty["Windows PTY Backend<br/>[pty_win.cpp]"]
  node_winheader["Windows PTY Interface<br/>[pty_win.h]"]
  node_constants["Terminal Key Maps<br/>[constants.cpp]"]
  node_registration["Extension Registration<br/>[register_types.cpp]"]
  node_regheader["Registration Interface<br/>[register_types.h]"]
end

node_user(("User"))
node_harness(("Coding Harness"))
node_transcripts[("Transcript Files")]

node_harness -->|"writes sessions"| node_transcripts
node_transcripts -->|"reads activity"| node_watcher
node_watcher -->|"sends events"| node_mcp
node_mcp -.->|"controls office"| node_manager
node_user -->|"views office"| node_manager
node_manager -.->|"manages agents"| node_agents
node_agents -.->|"animates agents"| node_agentvisuals
node_agents -.->|"walks routes"| node_navigation
node_user -->|"rearranges furniture"| node_furniture
node_user -.->|"customizes agents"| node_appearance
node_agents -->|"tracks fatigue"| node_mood
node_agents -->|"pets cat"| node_cat
node_user -->|"enables weather"| node_weather
node_weather -.->|"uses settings"| node_settings
node_user -->|"sees local time"| node_clock
node_agents -.->|"earns progress"| node_achievements
node_user -->|"configures app"| node_settings
node_user -->|"enables control"| node_mcp
node_user -.->|"opens terminal"| node_terminalui
node_terminalui -.->|"displays terminal"| node_terminal
node_terminal -->|"implements interface"| node_termheader
node_pty -->|"implements interface"| node_ptyheader
node_pty -->|"connects terminal"| node_terminal
node_pty -->|"dispatches Unix"| node_unixpty
node_pty -->|"dispatches Windows"| node_winpty
node_unixpty -->|"implements interface"| node_unixheader
node_winpty -->|"implements interface"| node_winheader
node_registration -->|"registers class"| node_pty
node_registration -->|"registers class"| node_terminal
node_registration -->|"implements interface"| node_regheader
node_constants -->|"uses PTY types"| node_ptyheader
node_constants -->|"uses terminal types"| node_termheader

click node_watcher "https://github.com/pknull/ccworkspace/blob/main/agent-office/watcher.py"
click node_mcp "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/McpServer.gd"
click node_tcp "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/TCPServer.gd"
click node_manager "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/OfficeManager.gd"
click node_agents "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/Agent.gd"
click node_agentvisuals "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AgentVisuals.gd"
click node_furniture "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/FurnitureRegistry.gd"
click node_navigation "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/NavigationGrid.gd"
click node_appearance "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AppearanceRegistry.gd"
click node_mood "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AgentMood.gd"
click node_cat "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/OfficeCat.gd"
click node_weather "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/WeatherSystem.gd"
click node_clock "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/WallClock.gd"
click node_achievements "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AchievementSystem.gd"
click node_settings "https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/SettingsRegistry.gd"
click node_terminalui "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd"
click node_terminal "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/terminal.cpp"
click node_termheader "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/terminal.h"
click node_pty "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty.cpp"
click node_ptyheader "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty.h"
click node_unixpty "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_unix.cpp"
click node_unixheader "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_unix.h"
click node_winpty "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_win.cpp"
click node_winheader "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_win.h"
click node_constants "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/constants.cpp"
click node_registration "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/register_types.cpp"
click node_regheader "https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/register_types.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_watcher,node_mcp,node_tcp,node_user toneBlue
class node_manager,node_agents,node_agentvisuals,node_furniture,node_navigation,node_transcripts toneAmber
class node_appearance,node_mood,node_cat,node_weather,node_clock,node_achievements,node_settings toneMint
class node_terminalui,node_terminal,node_termheader,node_pty,node_ptyheader,node_unixpty,node_unixheader,node_winpty,node_winheader,node_constants,node_registration,node_regheader toneRose
class node_harness toneIndigo
```

## Components

### Session Activity

- [Transcript Watcher](https://github.com/pknull/ccworkspace/blob/main/agent-office/watcher.py): `agent-office/watcher.py`
- [MCP Server](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/McpServer.gd): `agent-office/scripts/McpServer.gd`
- [TCP Server](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/TCPServer.gd): `agent-office/scripts/TCPServer.gd`

### Virtual Office

- [Office Manager](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/OfficeManager.gd): `agent-office/scripts/OfficeManager.gd`
- [Agent Simulation](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/Agent.gd): `agent-office/scripts/Agent.gd`
- [Agent Visuals](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AgentVisuals.gd): `agent-office/scripts/AgentVisuals.gd`
- [Furniture System](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/FurnitureRegistry.gd): `agent-office/scripts/FurnitureRegistry.gd`
- [Office Navigation](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/NavigationGrid.gd): `agent-office/scripts/NavigationGrid.gd`

### Office Features

- [Agent Appearance](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AppearanceRegistry.gd): `agent-office/scripts/AppearanceRegistry.gd`
- [Mood and Social](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AgentMood.gd): `agent-office/scripts/AgentMood.gd`
- [Office Cat](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/OfficeCat.gd): `agent-office/scripts/OfficeCat.gd`
- [Live Weather](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/WeatherSystem.gd): `agent-office/scripts/WeatherSystem.gd`
- [Day Night Cycle](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/WallClock.gd): `agent-office/scripts/WallClock.gd`
- [Achievements](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/AchievementSystem.gd): `agent-office/scripts/AchievementSystem.gd`
- [Settings](https://github.com/pknull/ccworkspace/blob/main/agent-office/scripts/SettingsRegistry.gd): `agent-office/scripts/SettingsRegistry.gd`

### Terminal Extension

- [Terminal Panel](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd): `agent-office/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd`
- [Terminal Renderer](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/terminal.cpp): `agent-office/addons/godot_xterm/native/src/terminal.cpp`
- [Terminal Interface](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/terminal.h): `agent-office/addons/godot_xterm/native/src/terminal.h`
- [PTY Transport](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty.cpp): `agent-office/addons/godot_xterm/native/src/pty.cpp`
- [PTY Interface](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty.h): `agent-office/addons/godot_xterm/native/src/pty.h`
- [Unix PTY Backend](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_unix.cpp): `agent-office/addons/godot_xterm/native/src/pty_unix.cpp`
- [Unix PTY Interface](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_unix.h): `agent-office/addons/godot_xterm/native/src/pty_unix.h`
- [Windows PTY Backend](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_win.cpp): `agent-office/addons/godot_xterm/native/src/pty_win.cpp`
- [Windows PTY Interface](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/pty_win.h): `agent-office/addons/godot_xterm/native/src/pty_win.h`
- [Terminal Key Maps](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/constants.cpp): `agent-office/addons/godot_xterm/native/src/constants.cpp`
- [Extension Registration](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/register_types.cpp): `agent-office/addons/godot_xterm/native/src/register_types.cpp`
- [Registration Interface](https://github.com/pknull/ccworkspace/blob/main/agent-office/addons/godot_xterm/native/src/register_types.h): `agent-office/addons/godot_xterm/native/src/register_types.h`

### Other components

- **User**
- **Coding Harness**
- **Transcript Files**

## Connections

- Coding Harness → Transcript Files: writes sessions (evidence: `README.md`)
- Transcript Files → Transcript Watcher: reads activity (evidence: `agent-office/watcher.py`)
- Transcript Watcher → MCP Server: sends events (evidence: `agent-office/watcher.py`)
- MCP Server → Office Manager: controls office
- User → Office Manager: views office (evidence: `README.md`)
- Office Manager → Agent Simulation: manages agents
- Agent Simulation → Agent Visuals: animates agents
- Agent Simulation → Office Navigation: walks routes
- User → Furniture System: rearranges furniture (evidence: `README.md`)
- User → Agent Appearance: customizes agents
- Agent Simulation → Mood and Social: tracks fatigue (evidence: `README.md`)
- Agent Simulation → Office Cat: pets cat (evidence: `README.md`)
- User → Live Weather: enables weather (evidence: `README.md`)
- Live Weather → Settings: uses settings
- User → Day Night Cycle: sees local time (evidence: `README.md`)
- Agent Simulation → Achievements: earns progress
- User → Settings: configures app (evidence: `README.md`)
- User → MCP Server: enables control (evidence: `README.md`)
- User → Terminal Panel: opens terminal
- Terminal Panel → Terminal Renderer: displays terminal
- Terminal Renderer → Terminal Interface: implements interface (evidence: `agent-office/addons/godot_xterm/native/src/terminal.cpp`)
- PTY Transport → PTY Interface: implements interface (evidence: `agent-office/addons/godot_xterm/native/src/pty.cpp`)
- PTY Transport → Terminal Renderer: connects terminal (evidence: `agent-office/addons/godot_xterm/native/src/pty.cpp`)
- PTY Transport → Unix PTY Backend: dispatches Unix (evidence: `agent-office/addons/godot_xterm/native/src/pty.cpp`)
- PTY Transport → Windows PTY Backend: dispatches Windows (evidence: `agent-office/addons/godot_xterm/native/src/pty.cpp`)
- Unix PTY Backend → Unix PTY Interface: implements interface (evidence: `agent-office/addons/godot_xterm/native/src/pty_unix.cpp`)
- Windows PTY Backend → Windows PTY Interface: implements interface (evidence: `agent-office/addons/godot_xterm/native/src/pty_win.cpp`)
- Extension Registration → PTY Transport: registers class (evidence: `agent-office/addons/godot_xterm/native/src/register_types.cpp`)
- Extension Registration → Terminal Renderer: registers class (evidence: `agent-office/addons/godot_xterm/native/src/register_types.cpp`)
- Extension Registration → Registration Interface: implements interface (evidence: `agent-office/addons/godot_xterm/native/src/register_types.cpp`)
- Terminal Key Maps → PTY Interface: uses PTY types (evidence: `agent-office/addons/godot_xterm/native/src/constants.cpp`)
- Terminal Key Maps → Terminal Interface: uses terminal types (evidence: `agent-office/addons/godot_xterm/native/src/constants.cpp`)
