How starstorm-ai/dsh-embedded-codex works
This package adds a Codex-mode agent to DeepSeek Harness (DSH). A Web Session selects the preset, the runtime resolves its permission mode and starts or resumes a Codex App Server thread, then projects Codex turn events into DSH session events. Codex owns model execution, native tools, sandboxing, approvals, hidden history, and compaction; DSH retains session and persistence responsibilities. The README documents compatibility providers and permission UI behavior, though their implementation details were not sampled; the graph includes those documented branches without inferring internal calls.
Main entry points: index.ts Runtime registration · app-server.ts App Server host · agent.ts Turn projection · permissions.ts Permission resolution
Components 17
Runtime and turns
- Runtime registration
src/index.ts - Turn projection
src/agent.ts - App Server host
src/app-server.ts - Permission resolution
src/permissions.ts - Model catalog
src/catalog.ts
DSH integration
- Agent preset provider
src/compat/providers/agent-presets.ts - Agent registry provider
src/compat/providers/agent-registry.ts - Session controller provider
src/compat/providers/session-controller.ts - Permission presets provider
src/compat/providers/permission-presets.ts - Conversation UI
src/compat/providers/ui-conversation.ts - Permission UI
src/compat/providers/ui-permission-presets.ts
Protocol contracts
- Codex RPC schemas
protocol/ClientRequest.ts - Codex v2 schemas
protocol/v2/index.ts
Other components
- Web user
- DSH Web Session
- Codex App Server
- DSH session events
Connections 19
- Web user → DSH Web Session: selects mode
README.md - DSH Web Session → Runtime registration: activates runtime
README.md - Runtime registration → Turn projection: registers runtime
src/index.ts - Runtime registration → App Server host: constructs host
src/index.ts - Runtime registration → Model catalog: registers adapter
src/index.ts - Runtime registration → Permission resolution: resolves modes
src/index.ts - Turn projection → App Server host: uses thread host
src/agent.ts - App Server host → Codex App Server: JSON-RPC requests
src/app-server.ts - Turn projection → DSH session events: projects turn events
src/agent.ts - Permission resolution → App Server host: supplies policy
README.md - Agent preset provider → DSH Web Session: provides preset
README.md - Session controller provider → DSH Web Session: replaces controller
src/compat/providers/session-controller.ts - Agent registry provider → DSH Web Session: registers preset
- Permission presets provider → DSH Web Session: provides modes
README.md - Conversation UI → DSH Web Session: adapts conversation UI
README.md - Permission UI → DSH Web Session: adapts permission UI
README.md - Codex RPC schemas → Codex v2 schemas: exports v2 types
- App Server host → Codex RPC schemas: uses RPC contracts
- Turn projection → Codex v2 schemas: uses turn types