# themodcraft-tmc/vessel-hq-extension-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/themodcraft-tmc/vessel-hq-extension-sdk
- Repository: https://github.com/themodcraft-tmc/vessel-hq-extension-sdk

## Overview

This repository is a standalone Vessel HQ extension SDK: Go clients connect over mTLS gRPC, verify package registration, and expose scoped reads and note/settings operations; protobuf and TypeScript define the host-facing contracts. README documents environment-summary and operator examples, plus native UI plugins for environment summary and persistent notes. The graph preserves these capabilities, but omits uncertain example-to-SDK call links where example source was not sampled.

Main entry points: [`client.go`](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/client.go) (mTLS Client), [`plugins/persistent-notes/ui/index.tsx`](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/plugins/persistent-notes/ui/index.tsx) (Persistent Notes UI), [`settings.go`](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/settings.go) (Settings Read), [`storage.go`](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/storage.go) (Note Storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["Go SDK"]
  node_config["Connection Config<br/>[config.go]"]
  node_client["mTLS Client<br/>[client.go]"]
  node_environment_read["Environment Read<br/>[client.go]"]
  node_settings_read["Settings Read<br/>[settings.go]"]
  node_note_storage["Note Storage<br/>[storage.go]"]
end

subgraph group_contracts["Host Contracts"]
  node_grpc_contract["gRPC Contract<br/>[extension.proto]"]
  node_ui_contract["Native UI Types<br/>[sdk.ts]"]
end

subgraph group_extensions["Examples And Plugins"]
  node_environment_cli["Environment CLI<br/>[main.go]"]
  node_operator_cli["Operator CLI<br/>[main.go]"]
  node_persistent_notes_ui["Persistent Notes UI<br/>[index.tsx]"]
  node_environment_ui["Environment Summary UI<br/>[index.tsx]"]
end

node_extension_app(("Extension App"))
node_host_gateway{{"Vessel Gateway"}}

node_extension_app -->|"loads config"| node_config
node_extension_app -->|"dials SDK"| node_client
node_client -->|"normalizes"| node_config
node_client -->|"uses RPC definitions"| node_grpc_contract
node_client -->|"verifies registration"| node_host_gateway
node_client -->|"reads environment"| node_environment_read
node_environment_read -->|"requests metadata"| node_host_gateway
node_client -->|"reads settings"| node_settings_read
node_settings_read -->|"requests settings"| node_host_gateway
node_client -->|"reads or writes notes"| node_note_storage
node_note_storage -->|"requests note operations"| node_host_gateway
node_persistent_notes_ui -->|"uses storage types"| node_ui_contract
node_persistent_notes_ui -->|"reads and saves notes"| node_host_gateway
node_environment_cli -.->|"uses SDK"| node_client
node_operator_cli -.->|"uses SDK"| node_client

click node_config "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/config.go"
click node_client "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/client.go"
click node_environment_read "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/client.go"
click node_settings_read "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/settings.go"
click node_note_storage "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/storage.go"
click node_grpc_contract "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/proto/v1/extension.proto"
click node_ui_contract "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/ui/sdk.ts"
click node_environment_cli "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/examples/environment-summary/main.go"
click node_operator_cli "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/examples/operator-client/main.go"
click node_persistent_notes_ui "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/plugins/persistent-notes/ui/index.tsx"
click node_environment_ui "https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/plugins/environment-summary/ui/index.tsx"

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_config,node_client,node_environment_read,node_settings_read,node_note_storage toneBlue
class node_grpc_contract,node_ui_contract toneAmber
class node_environment_cli,node_operator_cli,node_persistent_notes_ui,node_environment_ui toneMint
class node_extension_app,node_host_gateway toneIndigo
```

## Components

### Go SDK

- [Connection Config](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/config.go): `config.go`
- [mTLS Client](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/client.go): `client.go`
- [Environment Read](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/client.go): `client.go`
- [Settings Read](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/settings.go): `settings.go`
- [Note Storage](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/storage.go): `storage.go`

### Host Contracts

- [gRPC Contract](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/proto/v1/extension.proto): `proto/v1/extension.proto`
- [Native UI Types](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/ui/sdk.ts): `ui/sdk.ts`

### Examples And Plugins

- [Environment CLI](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/examples/environment-summary/main.go): `examples/environment-summary/main.go`
- [Operator CLI](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/examples/operator-client/main.go): `examples/operator-client/main.go`
- [Persistent Notes UI](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/plugins/persistent-notes/ui/index.tsx): `plugins/persistent-notes/ui/index.tsx`
- [Environment Summary UI](https://github.com/themodcraft-tmc/vessel-hq-extension-sdk/blob/main/plugins/environment-summary/ui/index.tsx): `plugins/environment-summary/ui/index.tsx`

### Other components

- **Extension App**
- **Vessel Gateway**

## Connections

- Extension App → Connection Config: loads config (evidence: `config.go`)
- Extension App → mTLS Client: dials SDK (evidence: `client.go`)
- mTLS Client → Connection Config: normalizes (evidence: `client.go`)
- mTLS Client → gRPC Contract: uses RPC definitions (evidence: `client.go`)
- mTLS Client → Vessel Gateway: verifies registration (evidence: `client.go`)
- mTLS Client → Environment Read: reads environment (evidence: `client.go`)
- Environment Read → Vessel Gateway: requests metadata (evidence: `client.go`)
- mTLS Client → Settings Read: reads settings (evidence: `settings.go`)
- Settings Read → Vessel Gateway: requests settings (evidence: `settings.go`)
- mTLS Client → Note Storage: reads or writes notes (evidence: `storage.go`)
- Note Storage → Vessel Gateway: requests note operations (evidence: `storage.go`)
- Persistent Notes UI → Native UI Types: uses storage types (evidence: `plugins/persistent-notes/ui/index.tsx`)
- Persistent Notes UI → Vessel Gateway: reads and saves notes (evidence: `README.md`)
- Environment CLI → mTLS Client: uses SDK
- Operator CLI → mTLS Client: uses SDK
