Skip to content

Shared libraries

Status: Current | Last reviewed: 2026-10-07

Code shared across services lives outside apps/.

shared/

TypeScript and Python packages consumed by multiple services. One subdirectory per package.

Package Language Used by Purpose
shared/a2ui-react TS surface-app, ai-manager Shared catalogue renderer, isolated version registry, related-surface context, transport and UI state. registryNamespace pins a renderer without changing native component names. Rebuild/pack and reinstall the tarball in both apps after changes.
shared/azure-avatar TS surface-app Azure Speech avatar bindings
shared/phone-emulator TS ai-manager (Preview, /emulator, embed) In-browser phone UA emulator; PhoneCallTest injects type-to-speak audio through its audioTrack option. Consumed as a packed tarball, so edits need npm run release. See phone-emulator.md
shared/python-runtime Python code-executor, knowledge-engine tsf_runtime helpers exposed to user-authored Python tools. Must be installed editable in Vanguard (pip install -e shared/python-runtime)
shared/reasoning-client TS / Python ai-orchestrator, async-agent Common client for the reasoning service in libs/
shared/service-definitions TS ai-manager, ai-orchestrator Per-service form/runtime schemas. Adding a new service edits files here. See universal-pipeline-builder.md
shared/trueserve-sdk TS crm-dashboard, surface-app Common DTOs and HTTP client
shared/workflow-node-types TS ai-manager, async-agent Workflow node type definitions; both ends import from here so the canvas + runtime stay aligned

libs/

Reusable language libraries — generally lower-level than shared/. Each has its own README.

Library Language Purpose
libs/go-audio Go Audio mixing, codec, fade math used by media-proxy
libs/http-client Go / TS / Python Shared HTTP client with tracing + retry
libs/knowledge Python Per-tenant Knowledge Sources connection resolver (tenant_settings key knowledge) shared by ai-orchestrator and async-agent. Host services inject their own pool getter + AES-GCM decryptor, mirroring libs/telemetry's tenant store
libs/ocr Python OCR helpers used by knowledge-engine and async-agent. agent-host's K8s mount of this lib previously needed a special hostPath in Kind dev mode — devcontainer doesn't hit this
libs/reasoning Python Reasoning service core (called via reasoning-client)
libs/transcription Python Transcription helpers
libs/ts-telemetry TS OpenTelemetry helpers for Node services

proto/

gRPC and protobuf definitions consumed by every language.

File Used by
proto/agent_control.proto ai-orchestrator ↔ ai-manager (test-call, kill-session)
proto/conversation.api.proto conversation-api gRPC ingress
proto/voice.agent.proto ai-orchestrator session start/audio
proto/byova_common.proto webex-connector-go BYOVA
proto/voicevirtualagent.proto Webex Virtual Agent
proto/moshi.service.proto Moshi (Kyutai) integration

Generated stubs are checked in alongside the .proto files (e.g. voice.agent.pb.go, voice.agent_grpc.pb.go).

See also