Wraith.Studio.Server (Wraith v0.1.0)

View Source

The one process behind the studio (ported in spirit from shadow_corp's Safehouses.Server, cut down to one conversation):

  1. wake/1 — start (or re-use) the VM through Wraith.Kiro.Runtime, open the ACP WebSocket, initialize, dial the bridge, then ensure_session + set_mode for the custom agent, load_session to replay history.
  2. prompt/2 — one turn at a time; session/update notifications become transcript entries (Wraith.Studio.Transcript) broadcast to the LiveView and persisted.
  3. Agent→client requests: session/request_permission is held in pending until the owner decides (permit/2); _kiro/userInput likewise (answer/2); bridge/http is answered at once by Wraith.Kiro.Bridge.handle/2 with Wraith.Studio.Tools.

State phases: :off (no VM), :booting, :ready, :error.

Summary

Functions

answer(tool_call_id, answer)

cancel()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

new_session(user)

permit(tool_call_id, option_id)

prompt(text, user)

shutdown()

start_link(opts \\ [])

state()

wake(user)