modscode / 図鑑 / delivery-run-view
delivery-run-view
A read-only view of delivery runs inside Claude Code, drawn from the run files the surfaces already write: a /flows pane with one row per phase — how it ran (inline, delegate, fork, gate; inferred and marked ? where the run does not record…
何をするか
- 欄・プロンプトの上の帯・ステータス行を描く
- /flows・/flows-demo を足す
- session.startにフックする
- ターンをまたいで自分の状態を持つ
良いところ
- ネットワークに出ない
- プロセスを起こさない
- TypeScript で書かれている
- エラーを扱う
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like delivery-run-view by Job Schepers (pane, band, status), as modscode read it from the mod's code:
// https://modscode.com/gallery/jsdotnet-delivery-run-view/
// 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 pane: open it with $.ui.open({ id: 'my-pane', title: "Delivery flows" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const title = '…'
const index = '…'
const length = '…'
const facts = '…'
const MARK = '…'
const MODE_LABEL = '…'
const who = '…'
const right = '…'
const rail = '…'
const who2 = '…'
const name = '…'
const map = '…'
const name2 = '…'
const map2 = '…'
const name3 = '…'
const map3 = '…'
const output = '…'
const name4 = '…'
const name5 = '…'
const name6 = '…'
const links = '…'
const filter = '…'
const MARK2 = '…'
const MODE_LABEL2 = '…'
const who3 = '…'
const right2 = '…'
const rail2 = '…'
const who4 = '…'
const name7 = '…'
const map4 = '…'
const name8 = '…'
const map5 = '…'
const name9 = '…'
const map6 = '…'
const output2 = '…'
const name10 = '…'
const name11 = '…'
const name12 = '…'
const links2 = '…'
const filter2 = '…'
const MARK3 = '…'
const MODE_LABEL3 = '…'
const who5 = '…'
const right3 = '…'
const rail3 = '…'
const who6 = '…'
const name13 = '…'
const map7 = '…'
const name14 = '…'
const map8 = '…'
const name15 = '…'
const map9 = '…'
const output3 = '…'
const name16 = '…'
const name17 = '…'
const name18 = '…'
const links3 = '…'
const filter3 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold wrap="truncate-end">
{title}
</Text>
<Box flexDirection="row" gap={1} flexShrink={0}>
<Button plain>
{`‹`}
</Button>
<Text dimColor>
{`${index}1`}
/
{length}
</Text>
<Button plain>
›
</Button>
</Box>
</Box>
<Text dimColor wrap="truncate-end">
{facts}
{" · this session"}
</Text>
<Box flexDirection="row" gap={2} marginBottom={1}>
<Text color="gray">
inline
</Text>
<Text color="cyan">
delegate
</Text>
<Text color="blue">
fork
</Text>
<Text color="magenta">
gate
</Text>
<Text dimColor>
? = inferred
</Text>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" gap={1}>
<Text>
{MARK}
</Text>
<Box flexGrow={1} flexShrink={1}>
<Button plain />
</Box>
<Text>
{MODE_LABEL}
</Text>
<Text dimColor wrap="truncate-end">
{who}
</Text>
<Text color="yellow">
{right}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{rail}
{" "}
{who2}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name}
{map}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name2}
{map2}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name3}
{map3}
</Text>
<Box flexDirection="column" marginLeft={2} marginBottom={1} borderStyle="single" paddingX={1}>
<Text wrap="wrap">
{output}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name4}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name5}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name6}
</Text>
<Text color="blue">
{"↗ "}
{links}
</Text>
<Text dimColor>
{filter}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" gap={1}>
<Text>
{MARK2}
</Text>
<Box flexGrow={1} flexShrink={1}>
<Button plain />
</Box>
<Text>
{MODE_LABEL2}
</Text>
<Text dimColor wrap="truncate-end">
{who3}
</Text>
<Text color="yellow">
{right2}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{rail2}
{" "}
{who4}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name7}
{map4}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name8}
{map5}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name9}
{map6}
</Text>
<Box flexDirection="column" marginLeft={2} marginBottom={1} borderStyle="single" paddingX={1}>
<Text wrap="wrap">
{output2}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name10}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name11}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name12}
</Text>
<Text color="blue">
{"↗ "}
{links2}
</Text>
<Text dimColor>
{filter2}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" gap={1}>
<Text>
{MARK3}
</Text>
<Box flexGrow={1} flexShrink={1}>
<Button plain />
</Box>
<Text>
{MODE_LABEL3}
</Text>
<Text dimColor wrap="truncate-end">
{who5}
</Text>
<Text color="yellow">
{right3}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{rail3}
{" "}
{who6}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name13}
{map7}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name14}
{map8}
</Text>
<Text color="red" wrap="truncate-end">
╰─▶
{" "}
{name15}
{map9}
</Text>
<Box flexDirection="column" marginLeft={2} marginBottom={1} borderStyle="single" paddingX={1}>
<Text wrap="wrap">
{output3}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name16}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name17}
</Text>
<Text color="green" wrap="truncate-end">
✓
{" "}
{name18}
</Text>
<Text color="blue">
{"↗ "}
{links3}
</Text>
<Text dimColor>
{filter3}
</Text>
</Box>
</Box>
</Box>
)
})
// 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 skillId = '…'
const name = '…'
const MODE_LABEL = '…'
const map = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" gap={1}>
<Text bold>
{skillId}
</Text>
<Box flexDirection="row">
<Text>
◇
</Text>
<Text>
◇
</Text>
<Text>
◇
</Text>
</Box>
<Text wrap="truncate-end">
<Text>
{name}
</Text>
<Text>
{" "}
{MODE_LABEL}
</Text>
<Text dimColor>
{map}
</Text>
</Text>
<Button plain>
details
</Button>
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
const skillId = '…'
const name = '…'
await $.ui.status(`${skillId} · ${name}`)
return next(e)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
plugins/delivery-run-view/hooks/register.tsx 338〜474 行 · ペイン
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const { value: list = [] } = await $.state.get(RUNS)
const index = Math.min((await $.state.get(SELECTED)).value ?? 0, Math.max(0, list.length - 1))
const pinned = (await $.state.get(FOCUS)).value ?? -1
const run = list[index]
const columns = (e.props as any)?.bodyColumns ?? e.viewport?.columns ?? 60
const isWide = columns >= 72
if (!run) {
return (
<Box flexDirection="column">
<Text dimColor>No delivery runs for this worktree yet.</Text>
<Text dimColor>A flow-* skill reports its phases here as it runs. /flows-demo plays one.</Text>
</Box>
)
}
const done = run.stages.filter(s => tone(s.status) === 'done').length
const live = currentStage(run)
const focused =
pinned >= 0 && pinned < run.stages.length
? pinned
: live
? run.stages.indexOf(live)
: run.stages.reduce((last, s, i) => (tone(s.status) === 'pending' ? last : i), 0)
const elapsed = run.startedAt && !run.id.startsWith('demo') ? Date.now() - Date.parse(run.startedAt) : null
const context = run.contextPeak && run.contextLimit ? `${Math.round((run.contextPeak / run.contextLimit) * 100)}% context` : ''
const facts = [run.skillId, run.changeKind, `${done}/${run.stages.length}`, duration(elapsed), context]
.filter(Boolean)
.join(' · ')
const badge = (s: FlowStage) => (
<Text color={MODE_COLOR[s.mode]} dimColor={!s.isModeRecorded}>
{MODE_LABEL[s.mode]}
{s.isModeRecorded ? '' : '?'}
</Text>
)
const who = (s: FlowStage) =>
[s.agent, [s.model, s.effort].filter(Boolean).join('/')].filter(Boolean).join(' · ')
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold wrap="truncate-end">
{run.title}
</Text>
{list.length > 1 && (
<Box flexDirection="row" gap={1} flexShrink={0}>
<Button key="prev" plain onPress={() => $.state.set(SELECTED, (index - 1 + list.length) % list.length)}>
‹
</Button>
<Text dimColor>
{index + 1}/{list.length}
</Text>
<Button key="next" plain onPress={() => $.state.set(SELECTED, (index + 1) % list.length)}>
›
</Button>
</Box>
)}
</Box>
<Text dimColor wrap="truncate-end">
{facts}
{run.isThisSession ? ' · this session' : ''}
</Text>
<Box flexDirection="row" gap={2} marginBottom={1}>
<Text color={MODE_COLOR.inline}>inline</Text>
<Text color={MODE_COLOR.delegate}>delegate</Text>
<Text color={MODE_COLOR.fork}>fork</Text>
<Text color={MODE_COLOR.gate}>gate</Text>
<Text dimColor>? = inferred</Text>
</Box>
{run.stages.map((s, i) => {
const t = tone(s.status)
const isFocused = i === focused
const rail = i === run.stages.length - 1 ? ' ' : '│'
const right = [s.passes > 1 ? `↺${s.passes}` : '', duration(s.durationMs)].filter(Boolean).join(' ')
return (
<Box key={`p${i}`} flexDirection="column">
<Box flexDirection="row" gap={1}>
<Text color={COLOR[t]}>{MARK[t]}</Text>
<Box flexGrow={1} flexShrink={1}>
<Button key={`f${i}`} plain onPress={() => $.state.set(FOCUS, isFocused ? -1 : i)}>
{s.name}
</Button>
</Box>
{badge(s)}
{isWide && who(s) && (
<Text dimColor wrap="truncate-end">
{who(s)}
</Text>
)}
{right && (
<Text dimColor={!isQuiet(t)} color={s.passes > 1 ? 'yellow' : undefined}>
{right}
</Text>
)}
</Box>
{!isWide && who(s) && !isQuiet(t) && (
<Text dimColor wrap="truncate-end">
{rail} {who(s)}
</Text>
)}
{s.workers.map((w, k) => (
<Text color={w.isFailed ? 'red' : 'cyan'} dimColor={t === 'done' && !isFocused} wrap="truncate-end">
{k === s.workers.length - 1 ? '╰─▶' : '├─▶'} {w.name}
{[w.model, duration(w.durationMs), w.toolCalls ? `${w.toolCalls} tools` : '', tokens(w.tokens)]
.filter(Boolean)
.map(x => ` · ${x}`)
.join('')}
</Text>
))}
{isFocused && !isQuiet(t) && (
<Box flexDirection="column" marginLeft={2} marginBottom={1} borderStyle="single" borderColor={COLOR[t]} paddingX={1}>
{s.output ? <Text wrap="wrap">{s.output}</Text> : <Text dimColor>No output yet.</Text>}
{s.scenarios.map(c => (
<Text color={c.status === 'pass' ? 'green' : c.status === 'fail' ? 'red' : 'yellow'} wrap="truncate-end">
{c.status === 'pass' ? '✓' : c.status === 'fail' ? '✗' : '~'} {c.name}
</Text>
))}
{s.links.length > 0 && <Text color="blue">↗ {s.links.join(' ↗ ')}</Text>}
{(s.outputTokens || s.toolCalls > 0) && (
<Text dimColor>
{[s.outputTokens ? `${tokens(s.outputTokens)} output tokens` : '', s.toolCalls ? `${s.toolCalls} tool calls` : '']
.filter(Boolean)
.join(' · ')}
</Text>
)}
</Box>
)}
</Box>
)
})}
</Box>
)
})plugins/delivery-run-view/hooks/register.tsx 477〜505 行 · バンド
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
if ((e.props as any)?.hasSurvey) return next(e)
const { value: list = [] } = await $.state.get(RUNS)
const run = list.find(r => r.isThisSession && tone(r.status) !== 'done')
if (!run) return next(e)
const { Box, Text, Button } = $.ui.resolve(e)
const live = currentStage(run)
return (
<Box flexDirection="row" gap={1}>
<Text bold>{run.skillId}</Text>
<Box flexDirection="row">
{run.stages.map(s => (
<Text color={COLOR[tone(s.status)]}>{s.mode === 'gate' && tone(s.status) === 'pending' ? '◇' : MARK[tone(s.status)]}</Text>
))}
</Box>
{live && (
<Text wrap="truncate-end">
<Text color={COLOR[tone(live.status)]}>{live.name}</Text>
<Text color={MODE_COLOR[live.mode]}> {MODE_LABEL[live.mode]}</Text>
<Text dimColor>{[live.agent, live.model].filter(Boolean).map(x => ` · ${x}`).join('')}</Text>
</Text>
)}
<Button key="open" plain onPress={() => $.ui.open({ id: PANE, title: 'Delivery flows' })}>
details
</Button>
</Box>
)
})ライセンスの全文(MIT)
MIT License Copyright (c) 2026 JSdotNet 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.
コードが呼ぶもの
ファイル読み取り環境変数保存
コードから読み取ったデザイン
読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。
コードから読めること
2026-10-06 に読んだコミット 4896728568a9 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。plugins/delivery-run-view/hooks/register.tsx |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。1 ファイルを解析 |
| コードが Mod の中で完結 | import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中 |
| 読める | 圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし |
| 呼び出しが見える | 通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で |
| 入れる前に自分で判断する材料 | |
| 描く場所 | コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く |
| 入れる手順 | リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる |
| Windows のプログラム | $.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない |
| 通信 | fetch の送り先(https のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。プログラムを起動しない |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。通信しない |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add JSdotNet/devbook/plugin install delivery-run-view@jsdotnet-devbook入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(4896728568a9)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「jsdotnet-delivery-run-view」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
何をするか
- プロンプトの上の帯を描く
- /seo-spend・/seo-doctor・/seo-cockpit を足す
- Agent の呼び出しを見張る(止めることがある)
- agent.spawn・classic.SessionStart・prompt.submit・session.compact ほか 3 個にフックする
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Claude に頼む…
-
Claude に頼む…TodayOct 63 left · Mar overdueRemCTL: Sep✓ All done for today.● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓Updated 14:32UndoRefresh
-
Claude に頼む…TO graph› Fix login › Fix login › Fix loginScopeThis featureWhole projectHide done stepsReconnect
-
Claude に頼む…InboxUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtralUntitled captureFinishing Open in localvoxtral