Signs in to a shared CloudWatch dashboard (M: UsrPwSingle) and exchanges the session for
temporary AWS credentials, entirely client-side — no AWS SDK, no proxy.
InitiateAuth(USER_SRP_AUTH) → RespondToAuthChallenge(PASSWORD_VERIFIER) → GetId →
GetCredentialsForIdentity. SRP-6a is implemented here with native BigInt + WebCrypto, because
USER_PASSWORD_AUTH is not enabled on the CloudWatch sharing app client.
bun install -g @lopecode/channelclaude mcp add lopecode bunx @lopecode/channelclaude --dangerously-load-development-channels server:lopecodeLive values of variables being observed by Claude Code.
Bridges a lopecode notebook to Claude Code via WebSocket.
Claude Code CLI ←MCP→ Channel Server ←WS→ This Module (browser)
Cell groups (in dependency order):
cc_chat (main interface), cc_watch_table (variable inspector)cc_config, cc_notebook_id, cc_activity, cc_status, cc_messages, cc_watches, cc_module, voiceEnabledcc_find_module resolves module names via runtime.mainscc_serialize_value (safe value→string for transport)cc_watchers observes variables, debounces & sends updatescc_handle_* (one per MCP tool)cc_command_handlers routes action→handlercc_ws manages connect/pair/auto-reconnect and message dispatchcc_change_forwarder streams cell edits, cc_voice optional speech I/OcurrentModules, exportToHTML, compile, history, runtime-sdk helpersReactive Inputs.input() cells holding connection state. These are the shared mutable atoms that UI and WebSocket cells read/write.
cc_find_module resolves a module name (e.g. "@tomlarkworthy/exporter-3") to a runtime Module object by polling viewof currentModules.value at call time (not reactively). cc_serialize_value safely converts any runtime value to a truncated string for transport.
Subscribes to Observable variables via observe(), debounces updates (1s), and forwards changes to Claude Code over the WebSocket. Also maintains the cc_watches table UI.
One handler per MCP tool. Each receives a cmd object and the Observable runtime, returns {ok, result} or {ok:false, error}. Handlers: get-variable, define-variable, define-cell, delete-variable, list-variables, list-cells, run-tests, create-module, delete-module, eval, fork, watch, unwatch.
cc_command_handlers maps action strings to handler functions. cc_ws manages the WebSocket lifecycle: connect, pair with token, dispatch incoming messages (commands, replies, tool-activity), and auto-reconnect from the URL hash cc= param or sessionStorage.
cc_change_forwarder polls the local-change-history and streams new cell edits to Claude Code. cc_voice provides optional speech recognition input and TTS output for hands-free pairing.