triflux 10.51.0 → 10.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/CLAUDE.md +20 -12
  2. package/README.ko.md +20 -31
  3. package/README.md +21 -32
  4. package/adapters/codex/skills/tfx-live/SKILL.md +25 -11
  5. package/bin/tfx-live.mjs +341 -104
  6. package/bin/triflux.mjs +161 -2267
  7. package/config/mcp-registry.json +3 -12
  8. package/cto/brief.mjs +0 -8
  9. package/cto/collect.mjs +1 -127
  10. package/cto/current.schema.json +2 -19
  11. package/cto/hygiene.mjs +2 -61
  12. package/cto/lake-root.mjs +0 -56
  13. package/cto/status.mjs +5 -139
  14. package/hub/bridge.mjs +65 -1172
  15. package/hub/lib/process-utils.mjs +1 -33
  16. package/hub/team/agents-row-attach.py +120 -0
  17. package/hub/team/agents-row.mjs +200 -0
  18. package/hub/team/claude-daemon-control.mjs +1 -2
  19. package/hub/team/claude-session-projection.mjs +5 -73
  20. package/hub/team/cli/commands/debug.mjs +1 -2
  21. package/hub/team/cli/commands/start/index.mjs +2 -1
  22. package/hub/team/cli/commands/start/start-mux.mjs +2 -4
  23. package/hub/team/cli/services/state-store.mjs +5 -20
  24. package/hub/team/codex-queue.mjs +385 -0
  25. package/hub/team/headless.mjs +96 -543
  26. package/hub/team/psmux.mjs +3 -33
  27. package/hub/team/session-context.mjs +1 -1
  28. package/hub/team/tui-viewer.mjs +9 -56
  29. package/hub/team/tui.mjs +0 -37
  30. package/hub/team/uds-orchestrator.mjs +2 -580
  31. package/hub/workers/factory.mjs +6 -51
  32. package/hub/workers/interface.mjs +1 -7
  33. package/hub/workers/lib/jsonrpc-core.mjs +11 -0
  34. package/hub/workers/lib/jsonrpc-ws-uds.mjs +5 -6
  35. package/hud/constants.mjs +2 -0
  36. package/hud/hud-qos-status.mjs +21 -5
  37. package/hud/providers/gemini.mjs +20 -0
  38. package/hud/renderers.mjs +79 -46
  39. package/hud/utils.mjs +9 -5
  40. package/package.json +2 -10
  41. package/scripts/__tests__/mcp-guard-engine-http-headers.test.mjs +6 -6
  42. package/scripts/__tests__/mcp-guard-engine-policy-sync.test.mjs +1 -4
  43. package/scripts/__tests__/mcp-guard-engine-proactive-sync.test.mjs +16 -21
  44. package/scripts/__tests__/mcp-guard-engine-stdio-sync.test.mjs +1 -1
  45. package/scripts/__tests__/mcp-guard-engine-sync-http-headers.test.mjs +2 -2
  46. package/scripts/__tests__/mcp-guard-engine.test.mjs +56 -63
  47. package/scripts/check-codex-config-stable.mjs +4 -37
  48. package/scripts/lib/agent-route-policy.mjs +0 -67
  49. package/scripts/lib/cli-claude.mjs +0 -12
  50. package/scripts/lib/env-probe.mjs +0 -70
  51. package/scripts/lib/legacy-mcp-cleanup.mjs +283 -0
  52. package/scripts/lib/mcp-guard-engine.mjs +40 -98
  53. package/scripts/lib/session-presence.mjs +1 -99
  54. package/scripts/pack.mjs +5 -57
  55. package/scripts/release/check-packages-mirror.mjs +2 -7
  56. package/scripts/setup.mjs +35 -419
  57. package/scripts/test-lock.mjs +0 -1
  58. package/scripts/tfx-route-post.mjs +0 -8
  59. package/scripts/tfx-route.sh +15 -75
  60. package/scripts/wt-cli.mjs +1 -2
  61. package/skills/tfx-auto/SKILL.md +2 -2
  62. package/skills/tfx-auto/references/tmux-observation.md +1 -1
  63. package/skills/tfx-doctor/SKILL.md +5 -6
  64. package/skills/tfx-lead/SKILL.md +195 -0
  65. package/skills/tfx-live/SKILL.md +25 -11
  66. package/skills/tfx-research/SKILL.md +2 -9
  67. package/skills/tfx-setup/SKILL.md +1 -1
  68. package/bin/tfx-doctor-tui.mjs +0 -7
  69. package/bin/tfx-setup-tui.mjs +0 -7
  70. package/hub/adaptive-diagnostic.mjs +0 -350
  71. package/hub/adaptive-inject.mjs +0 -224
  72. package/hub/adaptive-memory.mjs +0 -277
  73. package/hub/adaptive.mjs +0 -172
  74. package/hub/assign-callbacks.mjs +0 -170
  75. package/hub/delegator/contracts.mjs +0 -38
  76. package/hub/delegator/index.mjs +0 -14
  77. package/hub/delegator/schema/delegator-tools.schema.json +0 -250
  78. package/hub/delegator/service.mjs +0 -336
  79. package/hub/delegator/tool-definitions.mjs +0 -35
  80. package/hub/hitl.mjs +0 -202
  81. package/hub/hub-lifecycle.mjs +0 -248
  82. package/hub/lib/known-errors.json +0 -72
  83. package/hub/lib/memory-store.mjs +0 -1001
  84. package/hub/lib/phase-manager.mjs +0 -493
  85. package/hub/lib/state-snapshot.mjs +0 -293
  86. package/hub/lib/trace-recorder.mjs +0 -153
  87. package/hub/lib/uuidv7.mjs +0 -45
  88. package/hub/memory-doctor.mjs +0 -640
  89. package/hub/middleware/quota-middleware.mjs +0 -70
  90. package/hub/middleware/request-logger.mjs +0 -191
  91. package/hub/paths.mjs +0 -24
  92. package/hub/pipe.mjs +0 -825
  93. package/hub/pipeline/index.mjs +0 -163
  94. package/hub/pipeline/state.mjs +0 -191
  95. package/hub/pipeline/transitions.mjs +0 -131
  96. package/hub/promote-penalties.mjs +0 -138
  97. package/hub/public/dashboard.html +0 -416
  98. package/hub/reflexion.mjs +0 -290
  99. package/hub/role-contract.mjs +0 -312
  100. package/hub/router.mjs +0 -2026
  101. package/hub/schema.sql +0 -209
  102. package/hub/server.mjs +0 -3048
  103. package/hub/session-fingerprint.mjs +0 -418
  104. package/hub/state.mjs +0 -300
  105. package/hub/store-adapter.mjs +0 -182
  106. package/hub/store.mjs +0 -1736
  107. package/hub/team/cli/services/hub-client.mjs +0 -178
  108. package/hub/team/conductor-registry.mjs +0 -121
  109. package/hub/team/cto-auto-collect.mjs +0 -115
  110. package/hub/team/lead-control.mjs +0 -191
  111. package/hub/team/session-sync.mjs +0 -316
  112. package/hub/team/swarm-intent.mjs +0 -18
  113. package/hub/team/synapse-cli.mjs +0 -458
  114. package/hub/team/synapse-http.mjs +0 -311
  115. package/hub/team/synapse-registry.mjs +0 -618
  116. package/hub/team/tui-synapse.mjs +0 -223
  117. package/hub/team/worker-sandbox.mjs +0 -125
  118. package/hub/team-bridge.mjs +0 -27
  119. package/hub/tools.mjs +0 -900
  120. package/hub/workers/codex-app-server-worker.mjs +0 -1067
  121. package/hub/workers/delegator-mcp.mjs +0 -1098
  122. package/hub/workers/lib/jsonrpc-stdio.mjs +0 -204
  123. package/scripts/cache-doctor.mjs +0 -156
  124. package/scripts/cache-warmup.mjs +0 -602
  125. package/scripts/completions/tfx.bash +0 -65
  126. package/scripts/completions/tfx.fish +0 -54
  127. package/scripts/completions/tfx.zsh +0 -89
  128. package/scripts/hub-ensure.mjs +0 -842
  129. package/scripts/hub-watchdog.mjs +0 -90
  130. package/scripts/lib/claudemd-scanner.mjs +0 -26
  131. package/scripts/lib/context.mjs +0 -51
  132. package/scripts/lib/handoff.mjs +0 -187
  133. package/scripts/lib/logger.mjs +0 -122
  134. package/scripts/lib/stealth-fetch.mjs +0 -176
  135. package/scripts/notion-read.mjs +0 -686
  136. package/scripts/snapshot-codex-state.mjs +0 -37
  137. package/scripts/snapshot-gemini-state.mjs +0 -37
  138. package/scripts/sync-codex-auth.mjs +0 -71
  139. package/scripts/sync-hub-mcp-settings.mjs +0 -697
  140. package/tui/core.mjs +0 -266
  141. package/tui/doctor.mjs +0 -375
  142. package/tui/monitor-data.mjs +0 -152
  143. package/tui/monitor.mjs +0 -318
  144. package/tui/setup.mjs +0 -506
package/CLAUDE.md CHANGED
@@ -90,10 +90,10 @@ headless 워커는 AccountBroker를 사용한다.
90
90
  |------|------|
91
91
  | 계정별 회로 차단기 | 장애 격리: 한 계정 오류가 다른 계정에 전파되지 않음 |
92
92
  | 사용 중 플래그 | 동일 계정 이중 임대 방지 |
93
- | `/broker/reload` | 장시간 세션 중 accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. |
93
+ | `reloadBroker()` | accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. 허브가 없어 HTTP 엔드포인트는 없고 모듈 함수로만 부를 수 있다. |
94
94
  | 어댑터의 임대 없음 정책 | headless 어댑터는 브로커가 비활성·비어 있음이면 기본 CLI 인증 경로로 실행하고, 브로커가 활성인데 임대가 없으면 `circuit_open`으로 실패한다. |
95
- | 공개 스냅숏 정책 | `/broker/snapshot`과 대시보드는 `publicSnapshot()`만 사용한다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
96
- | 진단 이벤트 | `securityViolation`, `authSyncError`는 허브가 가린 경고 로그(`broker.security_violation`, `broker.auth_sync_error`)로 처리한다. |
95
+ | 공개 스냅숏 정책 | 밖에 보여 줄 때는 `publicSnapshot()`만 쓴다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
96
+ | 진단 이벤트 | `securityViolation`, `authSyncError`는 이벤트로만 내보낸다. 구독하는 쪽이 없으면 기록되지 않는다. |
97
97
  | EventEmitter 이벤트 | `lease`, `release`, `cooldown`, `tierFallback`, `circuitOpen`, `circuitClose`, `noAvailableAccounts`: HUD 연동용 |
98
98
  </account-broker>
99
99
 
@@ -141,19 +141,27 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
141
141
  ## 팀 실행 모드
142
142
 
143
143
  `tfx multi`는 tmux/psmux와 headless를 지원한다. in-process와 WT 팀 모드는 지원하지 않는다.
144
- 대화형 auto 실행에서 멀티플렉서가 없으면 tmux(macOS/Linux) 또는 psmux(Windows) 설치 오류로 끝난다.
145
- 비TTY에서 멀티플렉서가 없으면 headless로 실행한다. Windows Terminal의 독립 탭 열기는 유지한다.
144
+ headless 워커도 tmux/psmux 방에서 돈다. 멀티플렉서가 없으면 모드와 관계없이 설치 안내 오류로 끝난다.
145
+ Windows Terminal의 독립 탭 열기는 유지한다.
146
146
 
147
147
  ## 기본 연결 UI(`claude agents` 노출)
148
148
 
149
- 비대화식 워커는 기본적으로 `claude agents` 패널에 행으로 나타난다. 제외하려면 `--no-native-bridge-ui`를 쓴다.
149
+ 워커는 tmux 방에서 돌고, `claude agents` 행은 그 방에 붙는 attach client다. 행에서 Enter를 누르면
150
+ 워커가 도는 tmux pane이 열린다. 행은 공식 `claude --bg --exec`로 만든다(macOS/Linux).
150
151
 
151
- | 모드 | 기본값 | 행이 보이는 위치 |
152
- |------|---------|--------------------|
153
- | `tfx-auto` / `tfx multi`(비대화식) | 켬 | 로컬 `claude agents` |
154
- | 대화식(tmux/psmux) | 끔 | 해당 없음 |
152
+ | 대상 | 기본값 | 행에서 할 수 있는 것 |
153
+ |------|--------|----------------------|
154
+ | `tfx-auto` / `tfx multi` headless 워커 | 켬, `--no-native-bridge-ui`로 끔 | 읽기 전용 관찰 |
155
+ | `tfx-live start` 로 띄운 Claude 외 세션 | 켬 | 입력 가능. python3가 없으면 읽기 전용이고 행 이름에 `[read-only]`가 붙음 |
156
+ | 대화형 `tfx multi`(tmux/psmux) | 끔 | 해당 없음 |
155
157
 
156
- 감시자가 종료되면 즉시 데몬의 `sendKillBySessionId`를 실행해 오래된 행을 남기지 않는다. PRD: `.triflux/plans/native-bridge-ui-default-expansion.md`(PR #323으로 병합).
158
+ - 행을 닫거나 Ctrl+Z로 목록에 돌아가도 워커는 계속 돈다.
159
+ - headless 워커 여럿이 한 방을 나눠 쓰면 행마다 방 전체가 보이고, 활성 pane은 행끼리 공유한다.
160
+ - 방이 사라지면 행이 스스로 지워진다. headless 실행은 끝날 때 자기가 연 행을 직접 지운다.
161
+ - 바깥 터미널의 질의 응답이 방 입력으로 새지 않게, 읽기 전용 attach 또는 `hub/team/agents-row-attach.py` 중계를 쓴다.
162
+ - 행 생성에는 cwd가 Claude에서 trust 된 워크스페이스여야 한다. 실패하면 워커는 그대로 돌고 경고만 남는다.
163
+
164
+ 근거: [ADR-0026](docs/adr/0026-agents-row-tmux-attach.md).
157
165
  </native-bridge>
158
166
 
159
167
  <cross-review>
@@ -185,7 +193,7 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
185
193
  | `.claude/rules/tfx-update-logic.md` | triflux / OMC / gstack / Codex / Antigravity 업데이트 로직 |
186
194
  | `.claude/rules/tfx-stack-coexistence.md` | gstack / superpowers / triflux 공존 원칙, 레이어 분리, 의존 방향, 충돌 해소 |
187
195
  | `.claude/rules/tfx-mirror-policy.md` | packages/ 3계층 미러 정책(핵심 단순 복사 / 원격 가져오기 변환 / triflux 바이트 동일), 테스트 제외 규칙, 불일치 차단 |
188
- | `.claude/rules/tfx-cto-hub-boundary.md` | CTO 조회 표면과 Hub 소유권 경계 |
196
+ | `.claude/rules/tfx-cto-hub-boundary.md` | CTO lake 조회 표면과 의존 방향 |
189
197
  | `.claude/rules/tfx-doc-governance.md` | 실행 규칙, ADR, 설계, 계획 문서의 배치 |
190
198
  | `.claude/rules/tfx-escalation-chain.md` | 자동 재시도와 CLI 전환 체인 |
191
199
  | `.claude/rules/tfx-machine-profile.md` | 기기 프로필 우선순위와 실행 정책 |
package/README.ko.md CHANGED
@@ -25,20 +25,20 @@
25
25
  triflux는 코딩 작업을 Claude, Codex, Antigravity 사이에서 나눠 맡기는 Claude Code 플러그인이자
26
26
  npm CLI다. `/tfx-auto`에 할 일을 한 번 적으면 triflux가 CLI 레인(기본은 Codex)을 고르고, 임의
27
27
  셸 명령 대신 관리된 경로로 실행한다. 필요하면 로컬 병렬 워커, Claude↔Codex 라이브 세션, 원격 호스트로 작업을 나눈다.
28
- 코드 변경을 병렬로 진행할 때는 작업별 worktree와 세션을 분리한다. 설치, 진단, 로컬 Hub, 팀 실행은 `tfx`
28
+ 코드 변경을 병렬로 진행할 때는 작업별 worktree와 세션을 분리한다. 설치, 진단, 팀 실행은 `tfx`
29
29
  셸 CLI가 맡는다.
30
30
 
31
31
  ## 설치
32
32
 
33
33
  ```bash
34
34
  npm install -g triflux # postinstall이 setup 스크립트를 실행한다
35
- tfx doctor # CLI, tmux, Hub, MCP, 프로필, 스킬 점검
35
+ tfx doctor # CLI, tmux, MCP, 프로필, 스킬 점검
36
36
  ```
37
37
 
38
- npm 12 이상은 기본적으로 설치 스크립트를 막는다. setup과 네이티브 의존성의 스크립트를 허용해 설치한다.
38
+ npm 12 이상은 기본적으로 설치 스크립트를 막는다. setup 스크립트를 허용해 설치한다.
39
39
 
40
40
  ```bash
41
- npm i -g triflux --allow-scripts=triflux,better-sqlite3
41
+ npm i -g triflux --allow-scripts=triflux
42
42
  ```
43
43
 
44
44
  기본 setup은 `triflux` 마켓플레이스를 등록하고 mods 설치 안내만 출력한다. 사용량 band와
@@ -72,10 +72,10 @@ claude plugin install triflux@triflux
72
72
  | 스킬 | 용도 |
73
73
  | --- | --- |
74
74
  | `/tfx-auto` | 구현, 수정, 리뷰, 병렬 작업의 진입점. 동작은 아래 플래그로 정한다. |
75
- | `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`stop`, `peer` 중계, `orchestrate`, `list-sessions`. |
75
+ | `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`wait`/`stop`, `peer` 중계, `list-sessions`. |
76
76
  | `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
77
77
  | `/tfx-setup` | 대화형 설정. 파일 동기화, HUD, Codex 프로필, MCP, 훅 우선순위. |
78
- | `/tfx-doctor` | 진단과 복구. Hub 시작·중지·상태 확인도 여기서 한다. |
78
+ | `/tfx-doctor` | 진단과 복구. |
79
79
  | `/tfx-ship` | triflux 릴리즈 절차(메인테이너용). |
80
80
  | `/tfx-wt` | Windows Terminal 탭·패인 조작. `tfx setup`은 Windows에만 설치한다. |
81
81
 
@@ -132,26 +132,22 @@ Codex는 이름 붙은 프로필로 실행한다. 모델 ID는 `~/.codex/<프로
132
132
  | 명령 | 용도 |
133
133
  | --- | --- |
134
134
  | `tfx setup` / `tfx doctor` | 파일·HUD·MCP·프로필 동기화 / 진단과 복구(`--fix`, `--json`) |
135
- | `tfx multi` | tmux + Hub 기반 로컬 멀티 CLI 팀 |
136
- | `tfx synapse` | 세션 레지스트리와 lease |
137
- | `tfx hub` | 로컬 Hub: `start`, `stop`, `status`, `ensure` |
135
+ | `tfx multi` | tmux 기반 로컬 멀티 CLI 팀 |
138
136
  | `tfx mcp` | 관리형 MCP 레지스트리: `list`, `sync`, `add`, `remove` |
139
- | `tfx handoff` | 현재 맥락을 다른 세션이나 호스트로 넘길 프롬프트로 묶음 |
140
137
  | `tfx cto` | 저장소 단위 권위 콘솔: `collect`, `status`, `hygiene`(dry-run) |
141
- | `tfx codex-team` | Codex 주도 팀 모드 |
142
138
  | `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<지시>"` | 정책에 따라 `codex exec review`로 리뷰 전달 |
143
- | `tfx stealth-fetch <url>` | cloakbrowser로 URL 하나를 가져옴(JSON을 stdout으로) |
144
- | `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, 커밋 intent 트레일러, CLI 스키마, 설치된 스킬, TUI 모니터, 업데이트, 버전 |
139
+ | `tfx list`, `tfx update`, `tfx version` | 설치된 스킬, 업데이트, 버전 |
145
140
  | `tfx-live` | 라이브 세션 브리지(`/tfx-live` 스킬과 같은 명령) |
146
141
 
147
- 정확한 인자는 `tfx <명령> --help`나 `tfx schema <명령>`으로 확인한다.
142
+ 정확한 인자는 `tfx <명령> --help`로 확인한다.
148
143
 
149
144
  ## 런타임 기능
150
145
 
151
146
  **라이브 세션.** `tfx-live`는 Claude Code와 Codex TUI 세션을 조종한다. Claude 데몬 대상
152
147
  (`--short`/`--session-id`)은 UDS를 먼저 시도하고, `--session`도 주면 실패 시 tmux로 넘어간다.
153
- Codex는 tmux를 쓰거나 `--transport uds --thread <id|auto>`로 UDS를 쓴다. `peer`는 두 세션 사이를
154
- `--rounds`만큼 중계하고, `orchestrate`는 한 작업에 Claude와 Codex를 함께 붙인다. triflux의 Codex
148
+ Codex `ask`는 `codex queue`로 메시지를 쌓고(TUI에 `[from <보낸 세션>]` 첫 줄로 보인다) 못 쓰면 이유를
149
+ 남기고 tmux로 보낸다. `--transport uds --thread <id|auto>`로 UDS도 쓸 수 있다. `peer`는 두 세션 사이를
150
+ `--rounds`만큼 중계한다. triflux의 Codex
155
151
  훅이 실행 중인 Codex 세션을 `~/.local/state/triflux/codex-sessions/`에 기록하므로
156
152
  `tfx-live list-sessions --cli codex|claude`로 직접 띄운 tmux 세션도 찾을 수 있다.
157
153
 
@@ -159,10 +155,8 @@ Codex는 tmux를 쓰거나 `--transport uds --thread <id|auto>`로 UDS를 쓴다
159
155
  Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-status`, `--job-wait`,
160
156
  `--job-result`로 확인한다.
161
157
 
162
- **Hub.** 팀, 원격 세션, MCP 도구, 상태 표시를 잇는 로컬 메시지 버스다. 기본으로
163
- `127.0.0.1:27888`에 붙고(`TFX_HUB_PORT`로 변경), `TFX_HUB_TOKEN`이 있으면 bearer 토큰을 요구한다.
164
- `tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
165
- 끄려면 `--no-native-bridge-ui`를 준다.
158
+ **Headless 워커.** `tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
159
+ 행에서 Enter를 누르면 그 워커가 도는 tmux pane이 열린다. 끄려면 `--no-native-bridge-ui`를 준다.
166
160
 
167
161
  **재시도와 승격.** `--retry ralph`는 끝나거나 막힐 때(같은 실패 3회 연속)까지 반복한다.
168
162
  `--retry auto-escalate`는 Codex `gpt6_astra_max`에서 Claude `fable`로 올라간다. 체인은
@@ -177,7 +171,7 @@ Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-s
177
171
  **CTO lake.** `tfx cto collect`로 `.triflux/lake/`의 저장소 스냅샷을 갱신하고,
178
172
  `tfx cto status`로 생성 시각과 경과 시간을 확인한다. `tfx cto hygiene --dry-run`는 dry-run 결과를
179
173
  보고한다. 트레이와 쓰이지 않는 CTO 운영 명령은 제거하였다
180
- ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). 자동 수집은 기본으로 꺼져 있고 `TFX_CTO_AUTO_COLLECT=1` 로 켠다([ADR-0018](docs/adr/0018-cto-auto-behaviors-opt-in.md)).
174
+ ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). 자동 수집은 기본으로 꺼져 있고 `TFX_CTO_AUTO_COLLECT=1` 로 켠다([ADR-0018](docs/_archive/adr/0018-cto-auto-behaviors-opt-in.md)).
181
175
 
182
176
  **원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`
183
177
  (Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다. 세션 시작은
@@ -198,11 +192,8 @@ graph TD
198
192
  Route --> Claude[Claude Code]
199
193
  Team --> Route
200
194
  Live -->|UDS 또는 tmux| Sessions[Claude / Codex TUI 세션]
201
- Route --> Hub["Hub 127.0.0.1:27888"]
202
- Team --> Hub
203
- Hub --> Store[(SQLite 또는 메모리 저장소)]
204
- Hub --> MCP[MCP 도구]
205
- Hub --> UI["HUD · claude agents 패널"]
195
+ Route --> UI["HUD · claude agents 패널"]
196
+ Team --> UI
206
197
  CLI --> Lake[(".triflux/lake (tfx cto)")]
207
198
  ```
208
199
 
@@ -217,8 +208,8 @@ graph TD
217
208
  | Linux | tmux | 지원. |
218
209
  | Windows | psmux + Windows Terminal | 아래 참고. |
219
210
 
220
- **Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다. safety-guard가 `wt.exe`와 psmux `kill-session`
221
- 직접 호출을 막으므로 탭과 패인은 `tfx-wt` 스킬(Windows에만 설치)과
211
+ **Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다. `wt.exe`와 psmux `kill-session`은 직접 호출하지
212
+ 않고, 탭과 패인은 `tfx-wt` 스킬(Windows에만 설치)과
222
213
  `hub/team/wt-manager.mjs`를 거친다. 에이전트 규칙은
223
214
  [`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
224
215
 
@@ -226,9 +217,7 @@ graph TD
226
217
 
227
218
  | 층 | 보호 |
228
219
  | --- | --- |
229
- | 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`, Hub 워커, `tfx`로만 부르고 맨 `codex exec`나 `agy`로 부르지 않는다. 호출자가 지키는 규칙이며 이를 막는 훅은 없다. |
230
- | safety-guard 훅 | 위험한 셸 명령(루트 `rm -rf`, main 강제 push, `git clean -fd`, SQL `DROP`), `wt.exe`·psmux 종료 직접 호출, Windows 호스트로 SSH 보내는 bash 문법을 막고 관리된 대안을 알려 준다. |
231
- | Hub | localhost에만 붙는다. bearer 토큰(`TFX_HUB_TOKEN`)은 선택. |
220
+ | 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`, headless 워커, `tfx`로만 부르고 맨 `codex exec`나 `agy`로 부르지 않는다. 호출자가 지키는 규칙이며 이를 막는 훅은 없다. |
232
221
  | MCP 레지스트리 | 낡았거나 지원하지 않는 MCP 항목을 관리형 항목으로 바꾼다. |
233
222
  | 합의 결과 | deep·consensus 실행은 일부 레인이 빠졌거나 의견이 갈린 결과를 숨기지 않고 표시한다. |
234
223
 
package/README.md CHANGED
@@ -27,20 +27,20 @@ and Antigravity. You describe the task once with `/tfx-auto`; triflux picks the
27
27
  (Codex by default), runs it through managed routes instead of ad-hoc shell commands, and
28
28
  can fan the work out to parallel workers, live Claude↔Codex sessions, or remote
29
29
  hosts. Parallel code changes use separate worktrees and one session per worktree.
30
- The `tfx` shell CLI covers setup, diagnostics, the local Hub,
30
+ The `tfx` shell CLI covers setup, diagnostics,
31
31
  and team orchestration.
32
32
 
33
33
  ## Install
34
34
 
35
35
  ```bash
36
36
  npm install -g triflux # postinstall runs the setup script
37
- tfx doctor # check CLIs, tmux, Hub, MCP, profiles, skills
37
+ tfx doctor # check CLIs, tmux, MCP, profiles, skills
38
38
  ```
39
39
 
40
- npm 12 and newer block install scripts by default. Allow the setup and native dependency scripts:
40
+ npm 12 and newer block install scripts by default. Allow the setup script:
41
41
 
42
42
  ```bash
43
- npm i -g triflux --allow-scripts=triflux,better-sqlite3
43
+ npm i -g triflux --allow-scripts=triflux
44
44
  ```
45
45
 
46
46
  Setup registers the `triflux` marketplace and prints a mods installation hint. To install
@@ -74,10 +74,10 @@ Skills you invoke directly:
74
74
  | Skill | Use |
75
75
  | --- | --- |
76
76
  | `/tfx-auto` | Front door for implementing, fixing, reviewing, and parallel work. Behavior is set by flags (below). |
77
- | `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`stop`, `peer` relay, `orchestrate`, `list-sessions`. |
77
+ | `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`wait`/`stop`, `peer` relay, `list-sessions`. |
78
78
  | `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
79
79
  | `/tfx-setup` | Interactive setup: file sync, HUD, Codex profiles, MCP, hook priority. |
80
- | `/tfx-doctor` | Diagnose and repair; also starts, stops, and checks the Hub. |
80
+ | `/tfx-doctor` | Diagnose and repair. |
81
81
  | `/tfx-ship` | triflux release flow (maintainers). |
82
82
  | `/tfx-wt` | Windows Terminal tabs and panes. `tfx setup` installs it on Windows only. |
83
83
 
@@ -134,27 +134,22 @@ escalation chain: [`.claude/rules/tfx-escalation-chain.md`](.claude/rules/tfx-es
134
134
  | Command | Use |
135
135
  | --- | --- |
136
136
  | `tfx setup` / `tfx doctor` | Sync files, HUD, MCP, profiles / diagnose and repair (`--fix`, `--json`) |
137
- | `tfx multi` | Local multi-CLI team in tmux + Hub |
138
- | `tfx synapse` | Session registry and leases |
139
- | `tfx hub` | Local Hub: `start`, `stop`, `status`, `ensure` |
137
+ | `tfx multi` | Local multi-CLI team in tmux |
140
138
  | `tfx mcp` | Managed MCP registry: `list`, `sync`, `add`, `remove` |
141
- | `tfx handoff` | Serialize the current context for another session or host |
142
139
  | `tfx cto` | Repo-local authority console: `collect`, `status`, `hygiene` (dry-run) |
143
- | `tfx codex-team` | Codex-led team mode |
144
140
  | `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<instruction>"` | Send review to Codex (`codex exec review` via policy) |
145
- | `tfx stealth-fetch <url>` | Fetch one URL through cloakbrowser (JSON on stdout) |
146
- | `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, commit intent trailers, CLI schemas, installed skills, TUI monitor, update, version |
141
+ | `tfx list`, `tfx update`, `tfx version` | Installed skills, update, version |
147
142
  | `tfx-live` | Live session bridge (same as the `/tfx-live` skill) |
148
143
 
149
- `tfx <command> --help` and `tfx schema <command>` print the exact arguments.
144
+ `tfx <command> --help` prints the exact arguments.
150
145
 
151
146
  ## Runtime features
152
147
 
153
148
  **Live sessions.** `tfx-live` drives Claude Code and Codex TUI sessions. Claude daemon targets
154
149
  (`--short`/`--session-id`) try UDS first and fall back to tmux when `--session` is also given;
155
- Codex uses tmux, or UDS with
156
- `--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`, and
157
- `orchestrate` runs Claude + Codex on one task. triflux's Codex hook records running Codex
150
+ Codex `ask` queues the message with `codex queue` (shown in the TUI with a
151
+ `[from <sender>]` first line) and falls back to tmux with a reported reason; UDS stays available with
152
+ `--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`. triflux's Codex hook records running Codex
158
153
  sessions under `~/.local/state/triflux/codex-sessions/`, so `tfx-live list-sessions --cli codex|claude`
159
154
  also finds sessions you started yourself in tmux.
160
155
 
@@ -162,10 +157,9 @@ also finds sessions you started yourself in tmux.
162
157
  gets past Claude Code's 600-second Bash limit. Follow up with `--job-status`, `--job-wait`, and
163
158
  `--job-result`.
164
159
 
165
- **Hub.** A local message bus for teams, remote sessions, MCP tools, and status surfaces. It binds
166
- to `127.0.0.1:27888` by default (`TFX_HUB_PORT` overrides) and accepts a bearer token from
167
- `TFX_HUB_TOKEN`. Headless workers from `tfx-auto` and `tfx multi` appear in
168
- the `claude agents` panel unless you pass `--no-native-bridge-ui`.
160
+ **Headless workers.** Workers from `tfx-auto` and `tfx multi` appear in
161
+ the `claude agents` panel unless you pass `--no-native-bridge-ui`. Press Enter on a row to open the
162
+ tmux pane the worker runs in.
169
163
 
170
164
  **Retry and escalation.** `--retry ralph` loops until done or stuck (three identical failures).
171
165
  `--retry auto-escalate` steps from Codex `gpt6_astra_max` to Claude `fable`; override the chain in
@@ -179,7 +173,7 @@ falling back. Details: [`.claude/rules/tfx-machine-profile.md`](.claude/rules/tf
179
173
  **CTO lake.** Run `tfx cto collect` to refresh the repo snapshot in `.triflux/lake/`, then
180
174
  `tfx cto status` to inspect it with its generation time and age. `tfx cto hygiene --dry-run` reports
181
175
  dry-run findings. The tray and unused CTO operating commands were removed
182
- ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). Automatic collection stays off unless `TFX_CTO_AUTO_COLLECT=1` is set ([ADR-0018](docs/adr/0018-cto-auto-behaviors-opt-in.md)).
176
+ ([ADR-0024](docs/adr/0024-cto-explicit-queries-only.md)). Automatic collection stays off unless `TFX_CTO_AUTO_COLLECT=1` is set ([ADR-0018](docs/_archive/adr/0018-cto-auto-behaviors-opt-in.md)).
183
177
 
184
178
  **원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`에서 호스트를 읽는다
185
179
  (Windows: `%APPDATA%\triflux\hosts.json`). 세션 시작은 `remote-spawn.mjs`의
@@ -199,11 +193,8 @@ graph TD
199
193
  Route --> Claude[Claude Code]
200
194
  Team --> Route
201
195
  Live -->|UDS or tmux| Sessions[Claude / Codex TUI sessions]
202
- Route --> Hub["Hub 127.0.0.1:27888"]
203
- Team --> Hub
204
- Hub --> Store[(SQLite or memory store)]
205
- Hub --> MCP[MCP tools]
206
- Hub --> UI["HUD · claude agents panel"]
196
+ Route --> UI["HUD · claude agents panel"]
197
+ Team --> UI
207
198
  CLI --> Lake[(".triflux/lake (tfx cto)")]
208
199
  ```
209
200
 
@@ -218,8 +209,8 @@ Package layout and execution paths: [ARCHITECTURE.md](ARCHITECTURE.md). Document
218
209
  | Linux | tmux | Supported. |
219
210
  | Windows | psmux + Windows Terminal | See below. |
220
211
 
221
- **Windows.** psmux (a tmux fork) runs PowerShell by default. safety-guard blocks direct `wt.exe`
222
- and raw `psmux kill-session`, so tabs and panes go through the `tfx-wt` skill (set up only on
212
+ **Windows.** psmux (a tmux fork) runs PowerShell by default. Callers do not run `wt.exe` or raw
213
+ `psmux kill-session` directly; tabs and panes go through the `tfx-wt` skill (set up only on
223
214
  Windows) and `hub/team/wt-manager.mjs`. Agent rules:
224
215
  [`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
225
216
 
@@ -227,9 +218,7 @@ Windows) and `hub/team/wt-manager.mjs`. Agent rules:
227
218
 
228
219
  | Layer | Protection |
229
220
  | --- | --- |
230
- | Managed routes | Codex and Antigravity are called through `tfx-route.sh`, Hub workers, or `tfx`, never through a bare `codex exec` or `agy`. This is a rule for callers; no hook enforces it. |
231
- | safety-guard hook | Blocks destructive shell commands (root `rm -rf`, force push to main, `git clean -fd`, SQL `DROP`), direct `wt.exe`, raw psmux kill, and bash syntax sent over SSH to Windows hosts, and points to the managed alternative. |
232
- | Hub | Binds to localhost; optional bearer token (`TFX_HUB_TOKEN`). |
221
+ | Managed routes | Codex and Antigravity are called through `tfx-route.sh`, headless workers, or `tfx`, never through a bare `codex exec` or `agy`. This is a rule for callers; no hook enforces it. |
233
222
  | MCP registry | Replaces stale or unsupported MCP entries with managed ones. |
234
223
  | Consensus | Deep and consensus runs report degraded or disputed results instead of hiding them. |
235
224
 
@@ -3,7 +3,7 @@ name: tfx-live
3
3
  description: >
4
4
  Claude·Codex 세션을 실시간으로 생성·질의·대기·압축·종료하거나,
5
5
  tmux/daemon UDS 연결과 peer 중계를 운영할 때 사용한다.
6
- argument-hint: "<start|ask|wait|compact|stop|rename|interrupt|probe|list-sessions|peer|converse|goal-driven|orchestrate> ..."
6
+ argument-hint: "<start|ask|wait|compact|stop|rename|interrupt|probe|list-sessions|peer|converse|goal-driven> ..."
7
7
  ---
8
8
 
9
9
  # tfx-live
@@ -18,7 +18,8 @@ Codex에서는 `$tfx-live`로 호출한다. CLI의 `--cli`는 현재 호스트
18
18
  ## 전송 경로
19
19
 
20
20
  - Claude `--short` 또는 `--session-id`는 기본 `auto`로 UDS를 먼저 시도한다. `--session`이 있고 입력 미전송이 확인된 UDS 실패라면 tmux로 전환하고 `~/.claude/cache/triflux/tfx-live/bug-reports/uds-fallback-*.json`을 남긴다. 컨텍스트 가드 거부 시에는 전환하지 않는다.
21
- - Codex와 daemon 참조가 없는 Claude는 tmux가 기본이다. 기존 Codex thread의 UDS 연결은 `--transport uds --thread <id|auto>`를 명시한다.
21
+ - Codex `ask`는 `codex queue`가 기본이다. 아래 "Codex 메시지 전송" 순서를 따른다. 기존 Codex thread의 UDS 연결은 `--transport uds --thread <id|auto>`를 명시한다.
22
+ - daemon 참조가 없는 Claude는 tmux가 기본이다.
22
23
  - UDS 결과는 `matchedCompletion === true`일 때만 `done: true`다. timeout이나 연결 종료는 완료가 아니다.
23
24
  - bridge 선택 순서는 `--bridge`, `$TFX_BRIDGE`, `$TFX_REPO_ROOT/hub/bridge.mjs`, 번들된 `hub/bridge.mjs`다.
24
25
 
@@ -28,7 +29,7 @@ tfx-live ask --cli codex --session cx1 --prompt "현재 변경사항을 요약
28
29
  tfx-live stop --cli codex --session cx1
29
30
  ```
30
31
 
31
- 새 세션 이름은 `<월>.<일> <주제>`로 짓는다. `start --name`을 생략하면 자동으로 만들고 `nameGenerated: true`를 보고한다. `--resume` 또는 `--resume-last`는 `--name`을 명시한 경우에만 이름을 적용한다. 승계 세션에는 기존 이름 뒤에 ` 2`, 이후 ` 3`을 붙인다. 이름 적용을 요청한 경우 결과의 `nameApplied: false`는 적용 실패를 뜻한다. 기존 Codex UDS thread는 `tfx-live rename --cli codex --transport uds --thread ID --name "<이름>"`으로 이름을 바꾼다.
32
+ 새 세션 이름은 `<월>.<일> <주제>`로 짓는다. `start --name`을 생략하면 자동으로 만들고 `nameGenerated: true`를 보고한다. `--resume` 또는 `--resume-last`는 `--name`을 명시한 경우에만 이름을 적용한다. 승계 세션에는 기존 이름 뒤에 ` 2`, 이후 ` 3`을 붙인다. 이름 적용을 요청한 경우 결과의 `nameApplied: false`는 적용 실패를 뜻한다. Codex `start`는 `/rename` 제출을 입력창이 빌 때까지 확인하고, 이름으로 찾은 thread UUID를 `threadId`로 돌려주며 tmux 세션 옵션 `@tfx_codex_thread`에 남긴다. 기존 Codex UDS thread는 `tfx-live rename --cli codex --transport uds --thread ID --name "<이름>"`으로 이름을 바꾼다.
32
33
 
33
34
  ## 리드 운영
34
35
 
@@ -43,6 +44,18 @@ tfx-live stop --cli codex --session cx1
43
44
 
44
45
  두 번째 compact 전에는 handoff가 맞는지 점검한다. compact 횟수는 고정하지 않는다.
45
46
 
47
+ 리드 역할 절차(역할별 모델, 지시서, 교차 리뷰, 릴리스 조율)는 `tfx-lead` 스킬을 따른다.
48
+
49
+ ### Codex 메시지 전송
50
+
51
+ 1. 기본은 `codex queue --thread <UUID>`다. 입력창을 건드리지 않고, 바쁘면 쌓였다가 앞 턴이 끝난 직후 순서대로 들어간다. 유휴 TUI는 약 20초 주기로 큐를 가져간다.
52
+ 2. 첫 줄 머리말은 `[from <보낸 세션 이름>] [tfx-live req=<id>]`다. 이름은 `--from`, `$TFX_LIVE_FROM`, Claude 세션 기록, Codex `session_index` 순으로 찾고 없으면 머리말 없이 표식만 붙인다. Codex TUI는 Claude처럼 접어 보여 주지 않고 사용자 입력으로 그대로 표시한다.
53
+ 3. thread는 `--thread UUID`, `start`가 남긴 `@tfx_codex_thread`, Codex 세션 레지스트리, pane 프로세스의 `resume <UUID>` 인자, pane cwd와 같은 rollout 하나 순으로 찾는다. cwd 대응은 그 cwd의 Codex TUI가 하나일 때만 쓰고 exec 워커와 서브에이전트 thread는 뺀다. 이름으로는 보내지 않는다(`codex queue`의 이름 조회가 실패한다).
54
+ 4. tmux 직접 입력은 queue를 못 쓸 때만 쓴다: 원격 호스트, thread를 못 찾음(`resume --last`로 띄운 세션, 같은 cwd의 TUI 여럿 포함), `codex queue` 오류(0.160 미만 포함). 결과에 `transport: "tmux"`, `transportRequested: "queue"`, `fallbackReason`이 남는다. 시간 초과처럼 queue가 이미 쌓았을 수도 있는 오류는 `status: "unknown"`으로 끝내고 재전송하지 않는다.
55
+ 5. 슬래시 명령(`/rename`, `/compact`, `/new`)과 interrupt(Escape)는 tmux 직접 입력 전용이다. queue로 보낸 슬래시 명령은 실행되지 않고 일반 텍스트로 모델에 들어간다. `/명령`으로 시작하는 프롬프트(절대 경로는 제외)와 `--if-busy fail|interrupt`는 tmux로 보내고 `transportReason`을 남긴다. 슬래시 명령에는 표식을 붙이지 않으므로 `wait`로 추적할 수 없다.
56
+
57
+ 결과의 `status`는 `queued`(쌓임), `working`(TUI가 가져가 턴 시작), `completed`, `failed`로 나뉘고 `delivered`, `deliveredAt`, `turnId`가 배달을 구분한다. queue는 바쁜 세션에도 쌓으므로 `--if-busy wait`는 의미가 없다.
58
+
46
59
  ### 컨텍스트 판단
47
60
 
48
61
  분모는 공식 모델 창이고 실행 한도가 더 작으면 그 한도 아래에서 운영한다. 아래 비율은 공식 권고가 아닌 **[추론] 운영값**이다. 모델 문서가 바뀌면 한도도 갱신한다.
@@ -77,11 +90,15 @@ tfx-live stop --session cl1
77
90
  ```bash
78
91
  tfx-live ask --cli claude --transport uds --short <8hex> --prompt "진행 상황을 보고해줘" --no-wait
79
92
  tfx-live wait --cli claude --short <8hex> --request-id <requestId> --timeout 120 --poll-interval 500
93
+ tfx-live ask --cli codex --session cx1 --prompt "진행 상황을 보고해줘" --no-wait
94
+ tfx-live wait --cli codex --session cx1 --request-id <requestId> --timeout 120
80
95
  ```
81
96
 
82
- `ask --no-wait`는 `status: "submitted"`, `inputSent: true`, `done: false`, `submittedAt`, `target`, `requestId`를 반환한다. `ask`, `peer`, `converse`, `goal-driven`은 `[tfx-live req=<requestId>]`를 프롬프트 앞에 붙인다. `--no-relay-tag`로 제거하면 `wait --request-id`가 해당 요청을 찾을 수 없다.
97
+ `ask --no-wait`는 Claude와 tmux에서 `status: "submitted"`, Codex queue에서 `status: "queued"`와 함께 `inputSent: true`, `done: false`, `submittedAt`, `target`, `requestId`를 반환한다. `ask`, `peer`, `converse`, `goal-driven`은 `[tfx-live req=<requestId>]`를 프롬프트 앞에 붙인다. `--no-relay-tag`로 제거하면 `wait --request-id`가 해당 요청을 찾을 수 없다.
98
+
99
+ `wait`는 Claude transcript에서 표식을 user 메시지, `queue-operation`의 `enqueue` content, queued command attachment에서 찾는다. 표식이 소비된 턴이 끝난 뒤 마지막 assistant 텍스트를 응답으로 쓴다. 표식 없는 `wait`는 최신 user turn을 본다. `isSidechain`과 합성 API 오류 메시지는 정상 응답에서 제외한다. 요청을 소비한 턴에서 합성 오류가 나타나면 오류 문구와 `status: "failed"`를 반환한다. daemon의 `idle`만으로 완료를 단정하지 않는다. timeout은 `status: "working"`, `timedOut: true`, `done: false`다.
83
100
 
84
- `wait`는 Claude transcript에서 표식을 user 메시지, `queue-operation`의 `enqueue` content, queued command attachment에서 찾는다. 표식이 소비된 턴이 끝난 뒤 마지막 assistant 텍스트를 응답으로 쓴다. 표식 없는 `wait`는 최신 user turn을 본다. `isSidechain`과 합성 API 오류 메시지는 정상 응답에서 제외한다. 요청을 소비한 턴에서 합성 오류가 나타나면 오류 문구와 `status: "failed"`를 반환한다. daemon의 `idle`만으로 완료를 단정하지 않는다. timeout은 `status: "working"`, `timedOut: true`, `done: false`다. Codex UDS `wait`는 지원하지 않는다.
101
+ Codex `wait`는 `--session` 또는 `--thread UUID`의 rollout에서 표식이 든 user 메시지의 `turn_id`를 찾고, 같은 턴의 `task_complete.last_agent_message`를 응답으로 쓴다. `turn_aborted`는 `status: "failed"`다. 표식이 아직 없으면 `status: "queued"`, `timedOut: true`다. `--timeout 0`은 한 번만 확인한다.
85
102
 
86
103
  명시한 `--config-dir`은 정확히 일치하는 daemon만 선택한다. `CLAUDE_CONFIG_DIR`도 해당 env 디렉터리로 제한한다. stale endpoint 복구는 같은 source configDir 안에서만 재시도한다. attach 전 예외는 `inputSent: false`이므로 `auto`의 tmux fallback이 가능하다. attach 뒤 전송 여부가 불명확하면 `status: "unknown"`으로 보고하고 재전송하지 않는다.
87
104
 
@@ -93,7 +110,7 @@ tfx-live wait --cli claude --short <8hex> --request-id <requestId> --timeout 120
93
110
 
94
111
  `ask`와 tmux `interrupt`는 세션명, `name:window`, `name:window.pane`을 받는다. `start`와 tmux `stop --session`은 세션명만 받는다. `stop`은 pane·window 대상과 `%12`, `@3` 같은 ID를 거부한다. `--remote HOST`는 대상을 그대로 원격에 전달한다.
95
112
 
96
- `ask`는 pane의 작업 상태와 Codex `model: loading`을 확인한다. tmux의 `--if-busy wait|fail|interrupt` 기본값은 `wait`다. `--busy-timeout` 기본값은 `--timeout`이고 `--poll-interval`은 밀리초다. timeout이면 프롬프트를 보내지 않는다. `interrupt`는 Escape 후 idle을 기다린다. 기존 입력 초안이 있으면 붙여넣기와 합쳐질 수 있으므로 전송 전 pane을 확인한다.
113
+ tmux `ask`는 pane의 작업 상태와 Codex `model: loading`을 확인한다. tmux의 `--if-busy wait|fail|interrupt` 기본값은 `wait`다. `--busy-timeout` 기본값은 `--timeout`이고 `--poll-interval`은 밀리초다. timeout이면 프롬프트를 보내지 않는다. `interrupt`는 Escape 후 idle을 기다린다. 기존 입력 초안이 있으면 붙여넣기와 합쳐질 수 있으므로 전송 전 pane을 확인한다.
97
114
 
98
115
  ### Codex UDS 스레드
99
116
 
@@ -106,17 +123,14 @@ tfx-live ask --cli codex --transport uds --thread auto --cwd ~/Projects/my-workt
106
123
 
107
124
  `--thread auto`는 선택 조건에 맞는 로드된 thread가 정확히 하나일 때만 쓴다. 여러 개면 목록에서 ID를 골라 `--thread ID`를 지정한다. UDS의 `--if-busy wait|fail|steer` 기본값은 `wait`다. `thread/resume`으로 알림을 구독한 뒤 `turn/start`를 호출하고 반환된 turn ID의 완료만 인정한다. 완료 응답은 `final_answer`를 우선하고 중간 commentary는 따로 반환한다. `--max-turn`은 활동 연장 상한을 지정한다. Codex UDS `interrupt`는 지원하지 않으므로 tmux pane이 있으면 `interrupt --session <target>`을 쓴다.
108
125
 
109
- ## peer와 orchestrate
126
+ ## peer
110
127
 
111
128
  ```bash
112
129
  tfx-live peer --cli-a codex --cli-b claude --session-a cx-peer --session-b cl-peer --cwd ~/Projects --mode freeform --seed "변경을 함께 검토해줘" --rounds 2 --timeout 180
113
130
  tfx-live peer --cli-a codex --transport-a uds --thread-a <id|auto> --cli-b claude --transport-b uds --short-b <8hex> --cwd ~/Projects/my-worktree --mode freeform --seed "변경을 검토해줘"
114
- tfx-live orchestrate --task "이 변경의 위험을 한 줄로" --mode peer
115
131
  ```
116
132
 
117
- `peer`는 이전 응답을 반대쪽의 다음 프롬프트로 전달한다. 기존 tmux pane은 `--attach-a`·`--attach-b`로 연결하며 종료하지 않는다. UDS 쪽도 기존 세션으로 취급한다. `--if-busy-a`·`--if-busy-b`로 각 쪽의 정책을 정한다. 소유한 세션을 실제 종료한 경우에만 `stoppedA`·`stoppedB`가 참이다.
118
-
119
- `orchestrate`의 `--mode`는 `peer|codex-led|claude-led`다. Claude 쪽은 살아 있는 daemon이 필요하다. Codex는 기본 `exec` 경로 또는 실험적 `--codex-transport app-server-uds`를 쓴다. `--codex-socket PATH|default`는 기존 app-server daemon에 연결하고 새 임시 thread를 만든다.
133
+ `peer`는 이전 응답을 반대쪽의 다음 프롬프트로 전달한다. 기존 tmux pane은 `--attach-a`·`--attach-b`로 연결하며 종료하지 않는다. UDS 쪽도 기존 세션으로 취급한다. Codex tmux 쪽은 화면에서 응답을 읽으므로 queue가 아니라 tmux로 보낸다. `--if-busy-a`·`--if-busy-b`로 각 쪽의 정책을 정한다. 소유한 세션을 실제 종료한 경우에만 `stoppedA`·`stoppedB`가 참이다.
120
134
 
121
135
  ## 진단
122
136