コンテンツにスキップ

Conductor reference

Paneflow Conductor 制御プレーンの CLI verbs、JSON-RPC methods、fields、events、config keys、exit codes。

このページは Conductor のコンパクトな reference です。公開 surface と、script や LLM が信頼できる fields を定義します。

CLI verbs

VerbPrimary methodUse
ps [--json]fleet.listworkspaces 全体の検出済み agents を一覧
status <target> [--json]surface.status1 つの pane の agent state を読む
watch [--surface <sel>] [--type <event>]events.subscribelifecycle events と surface changes を stream
read <target>surface.readpane scrollback を読む
send <target> <text>surface.send_textpane に text を準備または送信
wait --match <sel>surface.read, idle mode では event streamidle state、regex、またはその両方まで block
up <file>workspace orchestration宣言的 agent workspace を作成
flow run <file>flow orchestrationmulti-agent pipeline を実行
ls, search, focus, keyscripting methodsconductor state だけでは足りない時の低レイヤー pane automation

読み取り操作はデフォルトで許可されています。send --submitkey、text を送信する flow step などの書き込みは、scripting gate または AI free access mode が必要です。

Selectors

SelectorExampleNotes
Numeric idpaneflow status 42正確な pane id
Namepaneflow status backendconductor workflows に最適な selector
cmdline:<substr>paneflow read cmdline:claude便利ですが pane name より portable ではありません
cwd:<path>paneflow read cwd:/home/me/apprepo-scoped scripts に適しています

何も match しない、または複数の pane に match する selector は code 3 で終了します。ただし broadcast sends、wait --anywait --all のように複数 match を明示的に受け入れる command は例外です。

fleet.list

paneflow ps --jsonagents array を返します。

FieldMeaning
pidagent process id、scan-only detection では null
toolclaudecodexopencodegemini などの agent family
statethinkingwaiting_for_inputfinishederroredstalledidleunknown_running
hookedPaneflow が lifecycle hook events を受け取っている時 true
reasondetection reason。unhooked processes では no_hook など
surface_id解決できた場合の pane id
surface_name存在する場合の pane name
workspaceworkspace index
active_tool_nameagent 内で実行中の tool。報告される場合
message待機中の question または permission text。報告される場合
last_resulthook が提供する場合の last turn summary
waiting_ms入力待ちに入ってからの milliseconds
idle_ms最後に観測された activity からの milliseconds

空のフリートは exit code 0{"agents":[]} です。

surface.status

paneflow status <target> --json は 1 つの pane status を返します。

FieldMeaning
surface_idpane id
statefleet.list と同じ state vocabulary
hookedlifecycle tracking が有効かどうか
tool検出された場合の agent family
active_tool_name実行中の tool。報告される場合
message待機中の question または permission text。報告される場合
last_result利用可能な場合の last turn summary
waiting_ms入力待ちに入ってからの milliseconds
idle_ms最後に観測された activity からの milliseconds
output_generationpane output が変わると進む monotonic counter

active agent がない pane は error ではなく idle state を返します。

surface.read

paneflow read <target> は terminal text を返します。デフォルトでは出力が <untrusted_terminal_output> で包まれるため、LLM はそれを instruction としてではなく inspect 対象として扱えます。--raw は trusted human scripts だけで使ってください。

JSON mode で有用な fields は textlinestotal_lineseofoutput_generation です。

events.subscribewatch

paneflow watch は newline-delimited JSON です。次を emit できます。

Event typeMeaning
ai.session_startagent session が始まる
ai.prompt_submitprompt が submit される
ai.tool_useagent が tool を呼び出す
ai.notificationagent が質問または permission を要求する
ai.stopturn が終わる
ai.exitagent process が終了する
ai.session_endsession が閉じる
surface_changedpane の output_generation が進んだ

Control frames も有効です。

FrameMeaning
subscribedsubscription acknowledged
heartbeatkeepalive frame
droppedsubscriber が遅れ、events が破棄された

client が dropped を受け取ったら、paneflow ps --json または paneflow status <target> --json で resync してください。

wait

wait --idle は利用可能なら event stream を使い、必要なら安全に fallback します。wait --pattern は 500 ms ごとに最近の scrollback を poll し、最新 500 行を scan します。

ModeExampleUse
Idlepaneflow wait --match reviewer --idle --timeout 600agent が作業を止めた後に続行
Patternpaneflow wait --match backend --pattern '^DONE:' --timeout 300sentinel line の後に続行
Idle plus patternpaneflow wait --match reviewer --idle --pattern '^REPORT_DONE' --timeout 600安定した pane と marker の両方を要求
Any or allpaneflow wait --match 'cmdline:claude' --pattern 'tests passed' --allpattern mode で複数 panes を調整

Timeout は code 4 で終了します。

Config keys

KeyDefaultMeaning
ai_unrestrictedfalse有効時、trusted AI automation に submit を許可
ai_injection_fencetruepeer terminal output を untrusted text として包む
agent_stall_threshold_secsapp default無音の in-progress turns を stalled として mark

Exit codes

CodeMeaning
0Success
1Runtime failure
2CLI usage error
3Target not found or ambiguous
4wait timeout
Paneflowの作者 Arthur Jean によって執筆されました。