modscode JA

modscode / Gallery / mission-control

mission-control

Live coding-orchestrator cockpit: relay context zone, subagents in flight, report-card grades and the Jev decision feed.

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonText

What it does

  • Draws a band above the prompt, a pane, the status line, toasts
  • Adds /orch, /sessions
  • Watches Bash calls and can refuse them
  • Hooks agent.spawn, session.measure, session.start, turn.complete
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Handles errors
  • Writes no files

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like mission-control by davesheffer (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/davesheffer-mission-control/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const zone = '…'
    const kTokens = '…'
    const kTokens2 = '…'
    const jevText = '…'
    const length = '…'
    const crew = '…'
    const roleOf = '…'
    const confidence = '…'
    const unverified = '…'
    const sessionCount = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text bold>
            ●
            {" "}
            {zone}
            {" "}
            {kTokens}
            /
            {kTokens2}
          </Text>
          <Text>
            ████████░░░░░░░░
          </Text>
          <Text>
            {jevText}
          </Text>
          <Text>
            🧠
            {" hunch "}
            {length}
            …
            {` ⚠${length}`}
          </Text>
          <Text wrap="truncate">
            ⚙
            {" "}
            {crew}
          </Text>
          <Text>
            {"last "}
            {roleOf}
            {" "}
            {confidence}
            {` ⚠${unverified}`}
          </Text>
          <Button label="orch" />
          <Button label={`🗂 ${sessionCount}`} />
          <Button label="hide" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Mission Control" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const zone = '…'
    const kTokens = '…'
    const kTokens2 = '…'
    const kTokens3 = '…'
    const kTokens4 = '…'
    const usd = '…'
    const ZONE_HINT = '…'
    const length = '…'
    const roleOf = '…'
    const model = '…'
    const seconds = '…'
    const description = '…'
    const roleOf2 = '…'
    const model2 = '…'
    const seconds2 = '…'
    const description2 = '…'
    const roleOf3 = '…'
    const model3 = '…'
    const seconds3 = '…'
    const description3 = '…'
    const confidence = '…'
    const roleOf4 = '…'
    const seconds4 = '…'
    const exitCodes = '…'
    const unverified = '…'
    const missing = '…'
    const result = '…'
    const confidence2 = '…'
    const roleOf5 = '…'
    const seconds5 = '…'
    const result2 = '…'
    const confidence3 = '…'
    const roleOf6 = '…'
    const seconds6 = '…'
    const result3 = '…'
    const length2 = '…'
    const map = '…'
    const clockTime = '…'
    const HUNCH_MARK = '…'
    const role = '…'
    const name = '…'
    const target = '…'
    const clockTime2 = '…'
    const HUNCH_MARK2 = '…'
    const role2 = '…'
    const name2 = '…'
    const target2 = '…'
    const clockTime3 = '…'
    const HUNCH_MARK3 = '…'
    const role3 = '…'
    const name3 = '…'
    const target3 = '…'
    const spendToday = '…'
    const deniesToday = '…'
    const weakToday = '…'
    const note = '…'
    const ts = '…'
    const feature = '…'
    const summary = '…'
    const ts2 = '…'
    const feature2 = '…'
    const summary2 = '…'
    const ts3 = '…'
    const feature3 = '…'
    const summary3 = '…'
    return (
      <Box flexDirection="column">
        <Text bold>
          Relay
        </Text>
        <Text>
          {zone}
          {" "}
          ████████░░░░░░░░
          {" "}
          {kTokens}
          /
          {kTokens2}
        </Text>
        <Text dimColor wrap="truncate">
          {"amber "}
          {kTokens3}
          {" · red "}
          {kTokens4}
          {` · session $${usd}`}
          {` · ${ZONE_HINT}`}
        </Text>
        <Text bold>
          In flight (
          {length}
          )
        </Text>
        <Text dimColor>
          No subagents running.
        </Text>
        <Text wrap="truncate">
          {roleOf}
          {" "}
          {model}
          {" "}
          {seconds}
          {" "}
          {"bg "}
          {description}
        </Text>
        <Text wrap="truncate">
          {roleOf2}
          {" "}
          {model2}
          {" "}
          {seconds2}
          {" "}
          {"bg "}
          {description2}
        </Text>
        <Text wrap="truncate">
          {roleOf3}
          {" "}
          {model3}
          {" "}
          {seconds3}
          {" "}
          {"bg "}
          {description3}
        </Text>
        <Text bold>
          Report cards
        </Text>
        <Text dimColor>
          No role reports yet.
        </Text>
        <Box flexDirection="column">
          <Text wrap="truncate">
            <Text>
              {confidence}
            </Text>
            {" "}
            {roleOf4}
            {" "}
            {seconds4}
            {` exit ${exitCodes}`}
            {` ⚠ ${unverified} unverified`}
            {` missing ${missing}`}
          </Text>
          <Text dimColor wrap="truncate">
            {"  "}
            {result}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text wrap="truncate">
            <Text>
              {confidence2}
            </Text>
            {" "}
            {roleOf5}
            {" "}
            {seconds5}
            {` exit ${exitCodes}`}
            {` ⚠ ${unverified} unverified`}
            {` missing ${missing}`}
          </Text>
          <Text dimColor wrap="truncate">
            {"  "}
            {result2}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text wrap="truncate">
            <Text>
              {confidence3}
            </Text>
            {" "}
            {roleOf6}
            {" "}
            {seconds6}
            {` exit ${exitCodes}`}
            {` ⚠ ${unverified} unverified`}
            {` missing ${missing}`}
          </Text>
          <Text dimColor wrap="truncate">
            {"  "}
            {result3}
          </Text>
        </Box>
        <Text bold>
          Hunch
          {" "}
          <Text>
            no task id yet
            {" · "}
            {length2}
            {" call"}
          </Text>
        </Text>
        <Text dimColor>
          No Hunch calls yet this task.
        </Text>
        <Text dimColor wrap="truncate">
          {map}
        </Text>
        <Box flexDirection="column">
          <Text wrap="truncate">
            {clockTime}
            {" "}
            {HUNCH_MARK}
            {" "}
            {role}
            {" "}
            {name}
            {" "}
            {target}
          </Text>
          <Text dimColor wrap="truncate">
            {"      "}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text wrap="truncate">
            {clockTime2}
            {" "}
            {HUNCH_MARK2}
            {" "}
            {role2}
            {" "}
            {name2}
            {" "}
            {target2}
          </Text>
          <Text dimColor wrap="truncate">
            {"      "}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text wrap="truncate">
            {clockTime3}
            {" "}
            {HUNCH_MARK3}
            {" "}
            {role3}
            {" "}
            {name3}
            {" "}
            {target3}
          </Text>
          <Text dimColor wrap="truncate">
            {"      "}
          </Text>
        </Box>
        <Text bold>
          Jev
          {" "}
          <Text color="green">
            online
          </Text>
        </Text>
        <Text dimColor>
          today $
          {spendToday}
          {" · "}
          {deniesToday}
          {" gate denies · "}
          {weakToday}
          {" weak reports"}
        </Text>
        <Text color="yellow">
          {note}
        </Text>
        <Text wrap="truncate" color="red">
          {ts}
          {" "}
          {feature}
          {" "}
          {summary}
        </Text>
        <Text wrap="truncate" color="red">
          {ts2}
          {" "}
          {feature2}
          {" "}
          {summary2}
        </Text>
        <Text wrap="truncate" color="red">
          {ts3}
          {" "}
          {feature3}
          {" "}
          {summary3}
        </Text>
        <Box flexDirection="row" columnGap={1}>
          <Button label="toggle band" />
          <Button label="clear done" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const zone = '…'
    const kTokens = '…'
    const running = '…'
    const jevMark = '…'
    const hunchCount = '…'
    const ZONE_HINT = '…'
    const op = '…'
    const why = '…'
    await $.ui.status(`${zone} ${kTokens} · ${running} agents · ${jevMark} · hunch ${hunchCount}`)
    await $.ui.toast(`Relay ${zone} at ${kTokens}: ${ZONE_HINT}`)
    await $.ui.toast(`⛔ Jev risk gate denied ${op} (${why})`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

mods/mission-control/hooks/register.tsx lines 522–570 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey || (await read($, isBandHidden))) return next(e)

    const { Box, Text, Button } = $.ui.resolve(e)
    const g = await read($, gauge)
    const j = await read($, jev)
    const running = (await read($, agents)).filter(agent => agent.status === 'running')
    const last = (await read($, reports)).at(-1)
    const hunchNow = taskCalls(await read($, hunch))
    const hunchLevel = loudest(hunchNow)
    const sessionCount = (await read($, sessions)).length
    const isWide = e.props.bodyColumns >= 100

    const zone: Zone = g?.zone ?? 'unknown'
    const fill = g?.tokens === undefined ? 0 : g.tokens / g.hard
    const jevColor = j?.isOnline === true ? 'green' : j?.isOnline === false ? 'red' : 'gray'
    const jevText = j?.isOnline === true ? 'Jev ✔' : j?.isOnline === false ? `Jev ✖ ${j.lastError ?? ''}`.trim() : 'Jev ?'
    const crew =
      running.length === 0
        ? 'idle'
        : running.map(agent => `${roleOf(agent.type)}·${agent.model}`).join(', ')

    return (
      <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
        <Text color={ZONE_COLOR[zone]} bold>
          {'●'} {zone.toUpperCase()} {kTokens(g?.tokens)}/{kTokens(g?.hard)}
        </Text>
        {isWide && <Text color={ZONE_COLOR[zone]}>{bar(fill, 10)}</Text>}
        <Text color={jevColor}>{jevText}</Text>
        <Text color={HUNCH_COLOR[hunchLevel] ?? (hunchNow.length === 0 ? 'gray' : 'cyan')}>
          {'🧠'} hunch {hunchNow.length}
          {hunchNow.some(call => call.status === 'running') ? '…' : ''}
          {hunchLevel !== 'info' ? ` ⚠${hunchNow.filter(call => call.level !== 'info').length}` : ''}
        </Text>
        <Text wrap="truncate">
          {'⚙'} {crew}
        </Text>
        {last !== undefined && (
          <Text color={CONFIDENCE_COLOR[last.confidence]}>
            last {roleOf(last.type)} {last.confidence.toUpperCase()}
            {last.unverified > 0 ? ` ⚠${last.unverified}` : ''}
          </Text>
        )}
        <Button key="open" label="orch" onPress={() => openPane($)} />
        <Button key="sessions" label={`🗂 ${sessionCount}`} onPress={() => openSessions($)} />
        <Button key="hide" label="hide" onPress={() => setBandHidden($, true)} />
      </Box>
    )
  })
mods/mission-control/hooks/register.tsx lines 572–700 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const g = await read($, gauge)
    const j = await read($, jev)
    const list = await read($, agents)
    const cards = await read($, reports)
    const hunchLog = await read($, hunch)
    const hunchNow = taskCalls(hunchLog)
    const counts = new Map<string, number>()
    for (const call of hunchNow) counts.set(call.name, (counts.get(call.name) ?? 0) + 1)
    const now = Math.max(await read($, tick), ...list.map(agent => agent.startedAt))
    const width = Math.max(20, e.props.bodyColumns)
    const zone: Zone = g?.zone ?? 'unknown'
    const running = list.filter(agent => agent.status === 'running')

    return (
      <Box flexDirection="column" width={width}>
        <Text bold>Relay</Text>
        <Text color={ZONE_COLOR[zone]}>
          {zone.toUpperCase()} {bar(g?.tokens === undefined ? 0 : g.tokens / g.hard, Math.min(24, width - 22))}{' '}
          {kTokens(g?.tokens)}/{kTokens(g?.hard)}
        </Text>
        <Text dimColor wrap="truncate">
          amber {kTokens(g?.soft)} · red {kTokens(g?.hard)}
          {g?.usd !== undefined ? ` · session $${g.usd.toFixed(2)}` : ''}
          {ZONE_HINT[zone] !== '' ? ` · ${ZONE_HINT[zone]}` : ''}
        </Text>

        <Text bold>In flight ({running.length})</Text>
        {running.length === 0 && <Text dimColor>No subagents running.</Text>}
        {running.map(agent => (
          <Text wrap="truncate">
            {roleOf(agent.type).padEnd(8)} {agent.model.padEnd(7)} {seconds(now - agent.startedAt).padStart(4)}{' '}
            {agent.isBackground ? 'bg ' : ''}
            {agent.description}
          </Text>
        ))}

        <Text bold>Report cards</Text>
        {cards.length === 0 && <Text dimColor>No role reports yet.</Text>}
        {cards
          .slice(-6)
          .reverse()
          .map(card => (
            <Box flexDirection="column">
              <Text wrap="truncate">
                <Text color={CONFIDENCE_COLOR[card.confidence]}>{card.confidence.toUpperCase().padEnd(7)}</Text>{' '}
                {roleOf(card.type).padEnd(8)} {seconds(card.durationMs).padStart(4)}
                {card.exitCodes.length > 0 ? ` exit ${card.exitCodes.join(',')}` : ''}
                {card.unverified > 0 ? ` ⚠ ${card.unverified} unverified` : ''}
                {card.missing.length > 0 ? ` missing ${card.missing.join('/')}` : ''}
              </Text>
              {card.result !== '' && (
                <Text dimColor wrap="truncate">
                  {'  '}
                  {card.result}
                </Text>
              )}
            </Box>
          ))}

        <Text bold>
          Hunch{' '}
          <Text color={HUNCH_COLOR[loudest(hunchNow)]}>
            {hunchLog.taskId ?? 'no task id yet'} · {hunchNow.length} call{hunchNow.length === 1 ? '' : 's'}
          </Text>
        </Text>
        {hunchNow.length === 0 && <Text dimColor>No Hunch calls yet this task.</Text>}
        {counts.size > 0 && (
          <Text dimColor wrap="truncate">
            {[...counts].map(([name, count]) => `${name} ${count}`).join(' · ')}
          </Text>
        )}
        {hunchNow
          .slice(-8)
          .reverse()
          .map(call => (
            <Box flexDirection="column">
              <Text wrap="truncate" color={HUNCH_COLOR[call.level]}>
                {clockTime(call.startedAt)} {HUNCH_MARK[call.status]} {call.role.padEnd(7)} {call.name.padEnd(17)}{' '}
                {call.durationMs === undefined ? '' : `${seconds(call.durationMs).padStart(4)} `}
                {call.target}
              </Text>
              {call.summary !== '' && (
                <Text dimColor wrap="truncate">
                  {'      '}
                  {call.summary}
                </Text>
              )}
            </Box>
          ))}

        <Text bold>
          Jev{' '}
          <Text color={j?.isOnline === true ? 'green' : j?.isOnline === false ? 'red' : 'gray'}>
            {j?.isOnline === true ? 'online' : j?.isOnline === false ? `offline (${j.lastError ?? 'unavailable'})` : 'unknown'}
          </Text>
        </Text>
        {j !== null && (
          <Text dimColor>
            today ${j.spendToday.toFixed(4)} · {j.deniesToday} gate denies · {j.weakToday} weak reports
          </Text>
        )}
        {j?.note !== undefined && <Text color="yellow">{j.note}</Text>}
        {(j?.recent ?? []).map(entry => (
          <Text wrap="truncate" color={entry.isAlert ? 'red' : undefined}>
            {entry.ts.slice(11, 16)} {entry.feature.padEnd(13)} {entry.summary}
          </Text>
        ))}

        <Box flexDirection="row" columnGap={1}>
          <Button
            key="band"
            label="toggle band"
            onPress={async () => setBandHidden($, !(await read($, isBandHidden)))}
          />
          <Button
            key="clear"
            label="clear done"
            onPress={async () => {
              await update($, agents, all => all.filter(agent => agent.status === 'running'))
              const now = await $.clock.now()
              await update($, hunch, log => ({ ...log, calls: reapStale(log.calls, now).filter(call => call.status === 'running') }))
            }}
          />
        </Box>
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 David Sheffer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

runs programsreads filesenv varstool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit f5418faa74ff on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.mods/mission-control/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.its repository's .claude-plugin/marketplace.json does not list it: no install line to give
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.mods/mission-control/hooks/register.tsx:329 python (a shell or interpreter)
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository's .claude-plugin/marketplace.json does not list it, so there is no install line to give. Read it as code, or follow its author's README.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "davesheffer-mission-control" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs