triflux 10.51.0 → 10.53.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.
- package/CLAUDE.md +17 -25
- package/README.ko.md +22 -32
- package/README.md +24 -34
- package/adapters/codex/skills/tfx-live/SKILL.md +37 -11
- package/bin/tfx-live.mjs +516 -109
- package/bin/triflux.mjs +178 -2285
- package/config/mcp-registry.json +7 -17
- package/cto/brief.mjs +0 -8
- package/cto/collect.mjs +1 -127
- package/cto/current.schema.json +2 -19
- package/cto/hygiene.mjs +2 -61
- package/cto/lake-root.mjs +0 -56
- package/cto/status.mjs +5 -139
- package/hub/bridge.mjs +69 -1197
- package/hub/cli-adapter-base.mjs +4 -104
- package/hub/codex-adapter.mjs +7 -116
- package/hub/lib/process-utils.mjs +1 -33
- package/hub/team/agents-row-attach.py +120 -0
- package/hub/team/agents-row.mjs +200 -0
- package/hub/team/claude-daemon-control.mjs +1 -2
- package/hub/team/claude-session-projection.mjs +5 -73
- package/hub/team/claude-transcript.mjs +19 -0
- package/hub/team/cli/commands/debug.mjs +1 -2
- package/hub/team/cli/commands/start/index.mjs +2 -1
- package/hub/team/cli/commands/start/start-headless.mjs +2 -0
- package/hub/team/cli/commands/start/start-mux.mjs +2 -4
- package/hub/team/cli/services/state-store.mjs +5 -20
- package/hub/team/codex-queue.mjs +492 -0
- package/hub/team/headless.mjs +132 -551
- package/hub/team/psmux.mjs +3 -33
- package/hub/team/results-index.mjs +92 -0
- package/hub/team/session-context.mjs +1 -1
- package/hub/team/tui-viewer.mjs +9 -56
- package/hub/team/tui.mjs +0 -37
- package/hub/team/uds-orchestrator.mjs +20 -599
- package/hub/workers/factory.mjs +6 -51
- package/hub/workers/interface.mjs +1 -7
- package/hub/workers/lib/jsonrpc-core.mjs +11 -0
- package/hub/workers/lib/jsonrpc-ws-uds.mjs +5 -6
- package/hud/constants.mjs +9 -22
- package/hud/hud-qos-status.mjs +16 -19
- package/hud/providers/codex-probe.mjs +2 -31
- package/hud/providers/codex.mjs +16 -58
- package/hud/providers/gemini.mjs +20 -0
- package/hud/renderers.mjs +101 -77
- package/hud/utils.mjs +9 -13
- package/package.json +2 -10
- package/scripts/__tests__/mcp-guard-engine-http-headers.test.mjs +6 -6
- package/scripts/__tests__/mcp-guard-engine-policy-sync.test.mjs +1 -4
- package/scripts/__tests__/mcp-guard-engine-proactive-sync.test.mjs +16 -21
- package/scripts/__tests__/mcp-guard-engine-stdio-sync.test.mjs +1 -1
- package/scripts/__tests__/mcp-guard-engine-sync-http-headers.test.mjs +2 -2
- package/scripts/__tests__/mcp-guard-engine.test.mjs +59 -66
- package/scripts/__tests__/tfx-doctor-diagnose.test.mjs +1 -2
- package/scripts/check-codex-config-stable.mjs +4 -37
- package/scripts/doctor-diagnose.mjs +8 -59
- package/scripts/lib/agent-route-policy.mjs +0 -67
- package/scripts/lib/cli-claude.mjs +0 -12
- package/scripts/lib/env-probe.mjs +0 -70
- package/scripts/lib/legacy-mcp-cleanup.mjs +283 -0
- package/scripts/lib/mcp-guard-engine.mjs +42 -101
- package/scripts/lib/session-presence.mjs +1 -99
- package/scripts/mcp-check.mjs +0 -22
- package/scripts/pack.mjs +6 -60
- package/scripts/release/check-packages-mirror.mjs +2 -7
- package/scripts/setup.mjs +40 -424
- package/scripts/test-lock.mjs +0 -1
- package/scripts/tfx-route-post.mjs +0 -8
- package/scripts/tfx-route.sh +16 -77
- package/scripts/wt-cli.mjs +1 -2
- package/skills/tfx-auto/SKILL.md +2 -2
- package/skills/tfx-auto/references/tmux-observation.md +1 -1
- package/skills/tfx-doctor/SKILL.md +5 -6
- package/skills/tfx-lead/SKILL.md +212 -0
- package/skills/tfx-live/SKILL.md +37 -11
- package/skills/tfx-research/SKILL.md +2 -9
- package/skills/tfx-setup/SKILL.md +3 -1
- package/bin/tfx-doctor-tui.mjs +0 -7
- package/bin/tfx-setup-tui.mjs +0 -7
- package/hub/account-broker.mjs +0 -1221
- package/hub/adaptive-diagnostic.mjs +0 -350
- package/hub/adaptive-inject.mjs +0 -224
- package/hub/adaptive-memory.mjs +0 -277
- package/hub/adaptive.mjs +0 -172
- package/hub/assign-callbacks.mjs +0 -170
- package/hub/delegator/contracts.mjs +0 -38
- package/hub/delegator/index.mjs +0 -14
- package/hub/delegator/schema/delegator-tools.schema.json +0 -250
- package/hub/delegator/service.mjs +0 -336
- package/hub/delegator/tool-definitions.mjs +0 -35
- package/hub/hitl.mjs +0 -202
- package/hub/hub-lifecycle.mjs +0 -248
- package/hub/lib/known-errors.json +0 -72
- package/hub/lib/memory-store.mjs +0 -1001
- package/hub/lib/phase-manager.mjs +0 -493
- package/hub/lib/state-snapshot.mjs +0 -293
- package/hub/lib/trace-recorder.mjs +0 -153
- package/hub/lib/uuidv7.mjs +0 -45
- package/hub/memory-doctor.mjs +0 -640
- package/hub/middleware/quota-middleware.mjs +0 -70
- package/hub/middleware/request-logger.mjs +0 -191
- package/hub/paths.mjs +0 -24
- package/hub/pipe.mjs +0 -825
- package/hub/pipeline/index.mjs +0 -163
- package/hub/pipeline/state.mjs +0 -191
- package/hub/pipeline/transitions.mjs +0 -131
- package/hub/promote-penalties.mjs +0 -138
- package/hub/public/dashboard.html +0 -416
- package/hub/reflexion.mjs +0 -290
- package/hub/role-contract.mjs +0 -312
- package/hub/router.mjs +0 -2026
- package/hub/schema.sql +0 -209
- package/hub/server.mjs +0 -3048
- package/hub/session-fingerprint.mjs +0 -418
- package/hub/state.mjs +0 -300
- package/hub/store-adapter.mjs +0 -182
- package/hub/store.mjs +0 -1736
- package/hub/team/cli/services/hub-client.mjs +0 -178
- package/hub/team/conductor-registry.mjs +0 -121
- package/hub/team/cto-auto-collect.mjs +0 -115
- package/hub/team/lead-control.mjs +0 -191
- package/hub/team/session-sync.mjs +0 -316
- package/hub/team/swarm-intent.mjs +0 -18
- package/hub/team/synapse-cli.mjs +0 -458
- package/hub/team/synapse-http.mjs +0 -311
- package/hub/team/synapse-registry.mjs +0 -618
- package/hub/team/tui-synapse.mjs +0 -223
- package/hub/team/worker-sandbox.mjs +0 -125
- package/hub/team-bridge.mjs +0 -27
- package/hub/tools.mjs +0 -900
- package/hub/workers/codex-app-server-worker.mjs +0 -1067
- package/hub/workers/delegator-mcp.mjs +0 -1098
- package/hub/workers/lib/jsonrpc-stdio.mjs +0 -204
- package/scripts/cache-doctor.mjs +0 -156
- package/scripts/cache-warmup.mjs +0 -602
- package/scripts/completions/tfx.bash +0 -65
- package/scripts/completions/tfx.fish +0 -54
- package/scripts/completions/tfx.zsh +0 -89
- package/scripts/hub-ensure.mjs +0 -842
- package/scripts/hub-watchdog.mjs +0 -90
- package/scripts/lib/claudemd-scanner.mjs +0 -26
- package/scripts/lib/context.mjs +0 -51
- package/scripts/lib/handoff.mjs +0 -187
- package/scripts/lib/logger.mjs +0 -122
- package/scripts/lib/stealth-fetch.mjs +0 -176
- package/scripts/notion-read.mjs +0 -686
- package/scripts/snapshot-codex-state.mjs +0 -37
- package/scripts/snapshot-gemini-state.mjs +0 -37
- package/scripts/sync-codex-auth.mjs +0 -71
- package/scripts/sync-hub-mcp-settings.mjs +0 -697
- package/tui/core.mjs +0 -266
- package/tui/doctor.mjs +0 -375
- package/tui/monitor-data.mjs +0 -152
- package/tui/monitor.mjs +0 -318
- package/tui/setup.mjs +0 -506
package/CLAUDE.md
CHANGED
|
@@ -81,22 +81,6 @@ Windows 전용 경로는 플랫폼과 `WT_SESSION` 조건을 확인한다.
|
|
|
81
81
|
프로필은 `$CODEX_HOME/<이름>.config.toml` 파일이다(인라인 `[profiles.*]` 아님).
|
|
82
82
|
</codex-config>
|
|
83
83
|
|
|
84
|
-
<account-broker>
|
|
85
|
-
## AccountBroker (계정 브로커)
|
|
86
|
-
|
|
87
|
-
headless 워커는 AccountBroker를 사용한다.
|
|
88
|
-
|
|
89
|
-
| 항목 | 설명 |
|
|
90
|
-
|------|------|
|
|
91
|
-
| 계정별 회로 차단기 | 장애 격리: 한 계정 오류가 다른 계정에 전파되지 않음 |
|
|
92
|
-
| 사용 중 플래그 | 동일 계정 이중 임대 방지 |
|
|
93
|
-
| `/broker/reload` | 장시간 세션 중 accounts.json을 다시 불러온다. 활성 임대 소유권은 다시 불러온 뒤에도 보존한다. |
|
|
94
|
-
| 어댑터의 임대 없음 정책 | headless 어댑터는 브로커가 비활성·비어 있음이면 기본 CLI 인증 경로로 실행하고, 브로커가 활성인데 임대가 없으면 `circuit_open`으로 실패한다. |
|
|
95
|
-
| 공개 스냅숏 정책 | `/broker/snapshot`과 대시보드는 `publicSnapshot()`만 사용한다. `env`, `authFile`, `profile`, `host`, 파일 경로, 가공하지 않은 실패 시각은 공개하지 않는다. |
|
|
96
|
-
| 진단 이벤트 | `securityViolation`, `authSyncError`는 허브가 가린 경고 로그(`broker.security_violation`, `broker.auth_sync_error`)로 처리한다. |
|
|
97
|
-
| EventEmitter 이벤트 | `lease`, `release`, `cooldown`, `tierFallback`, `circuitOpen`, `circuitClose`, `noAvailableAccounts`: HUD 연동용 |
|
|
98
|
-
</account-broker>
|
|
99
|
-
|
|
100
84
|
<remote>
|
|
101
85
|
## 원격 실행
|
|
102
86
|
|
|
@@ -141,19 +125,27 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
|
|
|
141
125
|
## 팀 실행 모드
|
|
142
126
|
|
|
143
127
|
`tfx multi`는 tmux/psmux와 headless를 지원한다. in-process와 WT 팀 모드는 지원하지 않는다.
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
headless 워커도 tmux/psmux 방에서 돈다. 멀티플렉서가 없으면 모드와 관계없이 설치 안내 오류로 끝난다.
|
|
129
|
+
Windows Terminal의 독립 탭 열기는 유지한다.
|
|
146
130
|
|
|
147
131
|
## 기본 연결 UI(`claude agents` 노출)
|
|
148
132
|
|
|
149
|
-
|
|
133
|
+
워커는 tmux 방에서 돌고, `claude agents` 행은 그 방에 붙는 attach client다. 행에서 Enter를 누르면
|
|
134
|
+
워커가 도는 tmux pane이 열린다. 행은 공식 `claude --bg --exec`로 만든다(macOS/Linux).
|
|
135
|
+
|
|
136
|
+
| 대상 | 기본값 | 행에서 할 수 있는 것 |
|
|
137
|
+
|------|--------|----------------------|
|
|
138
|
+
| `tfx-auto` / `tfx multi` headless 워커 | 켬, `--no-native-bridge-ui`로 끔 | 읽기 전용 관찰 |
|
|
139
|
+
| `tfx-live start` 로 띄운 Claude 외 세션 | 켬 | 입력 가능. python3가 없으면 읽기 전용이고 행 이름에 `[read-only]`가 붙음 |
|
|
140
|
+
| 대화형 `tfx multi`(tmux/psmux) | 끔 | 해당 없음 |
|
|
150
141
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
- 행을 닫거나 Ctrl+Z로 목록에 돌아가도 워커는 계속 돈다.
|
|
143
|
+
- headless 워커 여럿이 한 방을 나눠 쓰면 행마다 방 전체가 보이고, 활성 pane은 행끼리 공유한다.
|
|
144
|
+
- 방이 사라지면 행이 스스로 지워진다. headless 실행은 끝날 때 자기가 연 행을 직접 지운다.
|
|
145
|
+
- 바깥 터미널의 질의 응답이 방 입력으로 새지 않게, 읽기 전용 attach 또는 `hub/team/agents-row-attach.py` 중계를 쓴다.
|
|
146
|
+
- 행 생성에는 cwd가 Claude에서 trust 된 워크스페이스여야 한다. 실패하면 워커는 그대로 돌고 경고만 남는다.
|
|
155
147
|
|
|
156
|
-
|
|
148
|
+
근거: [ADR-0026](docs/adr/0026-agents-row-tmux-attach.md).
|
|
157
149
|
</native-bridge>
|
|
158
150
|
|
|
159
151
|
<cross-review>
|
|
@@ -185,7 +177,7 @@ Codex를 SSH 너머로 직접 실행하지 않는다. `config.toml` 충돌과 TT
|
|
|
185
177
|
| `.claude/rules/tfx-update-logic.md` | triflux / OMC / gstack / Codex / Antigravity 업데이트 로직 |
|
|
186
178
|
| `.claude/rules/tfx-stack-coexistence.md` | gstack / superpowers / triflux 공존 원칙, 레이어 분리, 의존 방향, 충돌 해소 |
|
|
187
179
|
| `.claude/rules/tfx-mirror-policy.md` | packages/ 3계층 미러 정책(핵심 단순 복사 / 원격 가져오기 변환 / triflux 바이트 동일), 테스트 제외 규칙, 불일치 차단 |
|
|
188
|
-
| `.claude/rules/tfx-cto-hub-boundary.md` | CTO 조회 표면과
|
|
180
|
+
| `.claude/rules/tfx-cto-hub-boundary.md` | CTO lake 조회 표면과 의존 방향 |
|
|
189
181
|
| `.claude/rules/tfx-doc-governance.md` | 실행 규칙, ADR, 설계, 계획 문서의 배치 |
|
|
190
182
|
| `.claude/rules/tfx-escalation-chain.md` | 자동 재시도와 CLI 전환 체인 |
|
|
191
183
|
| `.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와 세션을 분리한다. 설치, 진단,
|
|
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,
|
|
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
|
|
41
|
+
npm i -g triflux --allow-scripts=triflux
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
기본 setup은 `triflux` 마켓플레이스를 등록하고 mods 설치 안내만 출력한다. 사용량 band와
|
|
@@ -72,10 +72,11 @@ claude plugin install triflux@triflux
|
|
|
72
72
|
| 스킬 | 용도 |
|
|
73
73
|
| --- | --- |
|
|
74
74
|
| `/tfx-auto` | 구현, 수정, 리뷰, 병렬 작업의 진입점. 동작은 아래 플래그로 정한다. |
|
|
75
|
-
| `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`stop`, `peer` 중계, `
|
|
75
|
+
| `/tfx-live` | Claude↔Codex 라이브 세션. `start`/`ask`/`wait`/`stop`, `peer` 중계, `list-sessions`. |
|
|
76
|
+
| `/tfx-lead` | 여러 Claude, Codex 세션을 지휘하는 리드 역할. 역할별 모델, 지시서, 교차 리뷰, 머지·릴리스 조율. |
|
|
76
77
|
| `/tfx-remote` | SSH 원격 Claude Code 세션 시작, 조회, 재부착, 메시지 전송, 준비 상태 확인, 모니터링, 종료. |
|
|
77
|
-
| `/tfx-setup` |
|
|
78
|
-
| `/tfx-doctor` | 진단과 복구.
|
|
78
|
+
| `/tfx-setup` | 설정. 파일 동기화, HUD, Codex와 Antigravity 프로필, MCP. mods는 `tfx setup --mods`로 설치. |
|
|
79
|
+
| `/tfx-doctor` | 진단과 복구. |
|
|
79
80
|
| `/tfx-ship` | triflux 릴리즈 절차(메인테이너용). |
|
|
80
81
|
| `/tfx-wt` | Windows Terminal 탭·패인 조작. `tfx setup`은 Windows에만 설치한다. |
|
|
81
82
|
|
|
@@ -132,26 +133,22 @@ Codex는 이름 붙은 프로필로 실행한다. 모델 ID는 `~/.codex/<프로
|
|
|
132
133
|
| 명령 | 용도 |
|
|
133
134
|
| --- | --- |
|
|
134
135
|
| `tfx setup` / `tfx doctor` | 파일·HUD·MCP·프로필 동기화 / 진단과 복구(`--fix`, `--json`) |
|
|
135
|
-
| `tfx multi` | tmux
|
|
136
|
-
| `tfx synapse` | 세션 레지스트리와 lease |
|
|
137
|
-
| `tfx hub` | 로컬 Hub: `start`, `stop`, `status`, `ensure` |
|
|
136
|
+
| `tfx multi` | tmux 기반 로컬 멀티 CLI 팀 |
|
|
138
137
|
| `tfx mcp` | 관리형 MCP 레지스트리: `list`, `sync`, `add`, `remove` |
|
|
139
|
-
| `tfx handoff` | 현재 맥락을 다른 세션이나 호스트로 넘길 프롬프트로 묶음 |
|
|
140
138
|
| `tfx cto` | 저장소 단위 권위 콘솔: `collect`, `status`, `hygiene`(dry-run) |
|
|
141
|
-
| `tfx codex-team` | Codex 주도 팀 모드 |
|
|
142
139
|
| `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<지시>"` | 정책에 따라 `codex exec review`로 리뷰 전달 |
|
|
143
|
-
| `tfx
|
|
144
|
-
| `tfx notion-read`, `tfx why`, `tfx schema`, `tfx list`, `tfx monitor`, `tfx update`, `tfx version` | Notion → Markdown, 커밋 intent 트레일러, CLI 스키마, 설치된 스킬, TUI 모니터, 업데이트, 버전 |
|
|
140
|
+
| `tfx list`, `tfx update`, `tfx version` | 설치된 스킬, 업데이트, 버전 |
|
|
145
141
|
| `tfx-live` | 라이브 세션 브리지(`/tfx-live` 스킬과 같은 명령) |
|
|
146
142
|
|
|
147
|
-
정확한 인자는 `tfx <명령> --help
|
|
143
|
+
정확한 인자는 `tfx <명령> --help`로 확인한다.
|
|
148
144
|
|
|
149
145
|
## 런타임 기능
|
|
150
146
|
|
|
151
147
|
**라이브 세션.** `tfx-live`는 Claude Code와 Codex TUI 세션을 조종한다. Claude 데몬 대상
|
|
152
148
|
(`--short`/`--session-id`)은 UDS를 먼저 시도하고, `--session`도 주면 실패 시 tmux로 넘어간다.
|
|
153
|
-
Codex
|
|
154
|
-
`--
|
|
149
|
+
Codex `ask`는 `codex queue`로 메시지를 쌓고(TUI에 `[from <보낸 세션>]` 첫 줄로 보인다) 못 쓰면 이유를
|
|
150
|
+
남기고 tmux로 보낸다. `--transport uds --thread <id|auto>`로 UDS도 쓸 수 있다. `peer`는 두 세션 사이를
|
|
151
|
+
`--rounds`만큼 중계한다. triflux의 Codex
|
|
155
152
|
훅이 실행 중인 Codex 세션을 `~/.local/state/triflux/codex-sessions/`에 기록하므로
|
|
156
153
|
`tfx-live list-sessions --cli codex|claude`로 직접 띄운 tmux 세션도 찾을 수 있다.
|
|
157
154
|
|
|
@@ -159,10 +156,8 @@ Codex는 tmux를 쓰거나 `--transport uds --thread <id|auto>`로 UDS를 쓴다
|
|
|
159
156
|
Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-status`, `--job-wait`,
|
|
160
157
|
`--job-result`로 확인한다.
|
|
161
158
|
|
|
162
|
-
**
|
|
163
|
-
|
|
164
|
-
`tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
|
|
165
|
-
끄려면 `--no-native-bridge-ui`를 준다.
|
|
159
|
+
**Headless 워커.** `tfx-auto`, `tfx multi`의 headless 워커는 `claude agents` 패널에 행으로 보인다.
|
|
160
|
+
행에서 Enter를 누르면 그 워커가 도는 tmux pane이 열린다. 끄려면 `--no-native-bridge-ui`를 준다.
|
|
166
161
|
|
|
167
162
|
**재시도와 승격.** `--retry ralph`는 끝나거나 막힐 때(같은 실패 3회 연속)까지 반복한다.
|
|
168
163
|
`--retry auto-escalate`는 Codex `gpt6_astra_max`에서 Claude `fable`로 올라간다. 체인은
|
|
@@ -177,7 +172,7 @@ Claude Code Bash 도구의 600초 제한에 걸리지 않는다. 이후 `--job-s
|
|
|
177
172
|
**CTO lake.** `tfx cto collect`로 `.triflux/lake/`의 저장소 스냅샷을 갱신하고,
|
|
178
173
|
`tfx cto status`로 생성 시각과 경과 시간을 확인한다. `tfx cto hygiene --dry-run`는 dry-run 결과를
|
|
179
174
|
보고한다. 트레이와 쓰이지 않는 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)).
|
|
175
|
+
([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
176
|
|
|
182
177
|
**원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`
|
|
183
178
|
(Windows는 `%APPDATA%\triflux\hosts.json`)에서 호스트를 읽는다. 세션 시작은
|
|
@@ -198,11 +193,8 @@ graph TD
|
|
|
198
193
|
Route --> Claude[Claude Code]
|
|
199
194
|
Team --> Route
|
|
200
195
|
Live -->|UDS 또는 tmux| Sessions[Claude / Codex TUI 세션]
|
|
201
|
-
Route -->
|
|
202
|
-
Team -->
|
|
203
|
-
Hub --> Store[(SQLite 또는 메모리 저장소)]
|
|
204
|
-
Hub --> MCP[MCP 도구]
|
|
205
|
-
Hub --> UI["HUD · claude agents 패널"]
|
|
196
|
+
Route --> UI["HUD · claude agents 패널"]
|
|
197
|
+
Team --> UI
|
|
206
198
|
CLI --> Lake[(".triflux/lake (tfx cto)")]
|
|
207
199
|
```
|
|
208
200
|
|
|
@@ -217,8 +209,8 @@ graph TD
|
|
|
217
209
|
| Linux | tmux | 지원. |
|
|
218
210
|
| Windows | psmux + Windows Terminal | 아래 참고. |
|
|
219
211
|
|
|
220
|
-
**Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다.
|
|
221
|
-
|
|
212
|
+
**Windows.** psmux(tmux 포크)의 기본 셸은 PowerShell이다. `wt.exe`와 psmux `kill-session`은 직접 호출하지
|
|
213
|
+
않고, 탭과 패인은 `tfx-wt` 스킬(Windows에만 설치)과
|
|
222
214
|
`hub/team/wt-manager.mjs`를 거친다. 에이전트 규칙은
|
|
223
215
|
[`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
|
|
224
216
|
|
|
@@ -226,9 +218,7 @@ graph TD
|
|
|
226
218
|
|
|
227
219
|
| 층 | 보호 |
|
|
228
220
|
| --- | --- |
|
|
229
|
-
| 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`,
|
|
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`)은 선택. |
|
|
221
|
+
| 관리된 경로 | Codex와 Antigravity는 `tfx-route.sh`, headless 워커, `tfx`로만 부르고 맨 `codex exec`나 `agy`로 부르지 않는다. 호출자가 지키는 규칙이며 이를 막는 훅은 없다. |
|
|
232
222
|
| MCP 레지스트리 | 낡았거나 지원하지 않는 MCP 항목을 관리형 항목으로 바꾼다. |
|
|
233
223
|
| 합의 결과 | deep·consensus 실행은 일부 레인이 빠졌거나 의견이 갈린 결과를 숨기지 않고 표시한다. |
|
|
234
224
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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,11 @@ 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, `
|
|
78
|
-
| `/tfx-
|
|
79
|
-
| `/tfx-
|
|
80
|
-
| `/tfx-
|
|
77
|
+
| `/tfx-live` | Live Claude↔Codex sessions: `start`/`ask`/`wait`/`stop`, `peer` relay, `list-sessions`. |
|
|
78
|
+
| `/tfx-lead` | Lead role for running several Claude/Codex sessions: roles and models, briefs, cross review, merge and release coordination. |
|
|
79
|
+
| `/tfx-remote` | Remote Claude Code sessions over SSH: start, list, reattach, send, readiness probe, monitor, stop. |
|
|
80
|
+
| `/tfx-setup` | Setup: file sync, HUD, Codex and Antigravity profiles, MCP. `tfx setup --mods` installs mods. |
|
|
81
|
+
| `/tfx-doctor` | Diagnose and repair. |
|
|
81
82
|
| `/tfx-ship` | triflux release flow (maintainers). |
|
|
82
83
|
| `/tfx-wt` | Windows Terminal tabs and panes. `tfx setup` installs it on Windows only. |
|
|
83
84
|
|
|
@@ -134,27 +135,22 @@ escalation chain: [`.claude/rules/tfx-escalation-chain.md`](.claude/rules/tfx-es
|
|
|
134
135
|
| Command | Use |
|
|
135
136
|
| --- | --- |
|
|
136
137
|
| `tfx setup` / `tfx doctor` | Sync files, HUD, MCP, profiles / diagnose and repair (`--fix`, `--json`) |
|
|
137
|
-
| `tfx multi` | Local multi-CLI team in tmux
|
|
138
|
-
| `tfx synapse` | Session registry and leases |
|
|
139
|
-
| `tfx hub` | Local Hub: `start`, `stop`, `status`, `ensure` |
|
|
138
|
+
| `tfx multi` | Local multi-CLI team in tmux |
|
|
140
139
|
| `tfx mcp` | Managed MCP registry: `list`, `sync`, `add`, `remove` |
|
|
141
|
-
| `tfx handoff` | Serialize the current context for another session or host |
|
|
142
140
|
| `tfx cto` | Repo-local authority console: `collect`, `status`, `hygiene` (dry-run) |
|
|
143
|
-
| `tfx codex-team` | Codex-led team mode |
|
|
144
141
|
| `bash ~/.claude/scripts/tfx-route.sh code-reviewer "<instruction>"` | Send review to Codex (`codex exec review` via policy) |
|
|
145
|
-
| `tfx
|
|
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 |
|
|
142
|
+
| `tfx list`, `tfx update`, `tfx version` | Installed skills, update, version |
|
|
147
143
|
| `tfx-live` | Live session bridge (same as the `/tfx-live` skill) |
|
|
148
144
|
|
|
149
|
-
`tfx <command> --help`
|
|
145
|
+
`tfx <command> --help` prints the exact arguments.
|
|
150
146
|
|
|
151
147
|
## Runtime features
|
|
152
148
|
|
|
153
149
|
**Live sessions.** `tfx-live` drives Claude Code and Codex TUI sessions. Claude daemon targets
|
|
154
150
|
(`--short`/`--session-id`) try UDS first and fall back to tmux when `--session` is also given;
|
|
155
|
-
Codex
|
|
156
|
-
|
|
157
|
-
`
|
|
151
|
+
Codex `ask` queues the message with `codex queue` (shown in the TUI with a
|
|
152
|
+
`[from <sender>]` first line) and falls back to tmux with a reported reason; UDS stays available with
|
|
153
|
+
`--transport uds --thread <id|auto>`. `peer` relays between two sessions for `--rounds`. triflux's Codex hook records running Codex
|
|
158
154
|
sessions under `~/.local/state/triflux/codex-sessions/`, so `tfx-live list-sessions --cli codex|claude`
|
|
159
155
|
also finds sessions you started yourself in tmux.
|
|
160
156
|
|
|
@@ -162,10 +158,9 @@ also finds sessions you started yourself in tmux.
|
|
|
162
158
|
gets past Claude Code's 600-second Bash limit. Follow up with `--job-status`, `--job-wait`, and
|
|
163
159
|
`--job-result`.
|
|
164
160
|
|
|
165
|
-
**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
the `claude agents` panel unless you pass `--no-native-bridge-ui`.
|
|
161
|
+
**Headless workers.** Workers from `tfx-auto` and `tfx multi` appear in
|
|
162
|
+
the `claude agents` panel unless you pass `--no-native-bridge-ui`. Press Enter on a row to open the
|
|
163
|
+
tmux pane the worker runs in.
|
|
169
164
|
|
|
170
165
|
**Retry and escalation.** `--retry ralph` loops until done or stuck (three identical failures).
|
|
171
166
|
`--retry auto-escalate` steps from Codex `gpt6_astra_max` to Claude `fable`; override the chain in
|
|
@@ -179,7 +174,7 @@ falling back. Details: [`.claude/rules/tfx-machine-profile.md`](.claude/rules/tf
|
|
|
179
174
|
**CTO lake.** Run `tfx cto collect` to refresh the repo snapshot in `.triflux/lake/`, then
|
|
180
175
|
`tfx cto status` to inspect it with its generation time and age. `tfx cto hygiene --dry-run` reports
|
|
181
176
|
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)).
|
|
177
|
+
([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
178
|
|
|
184
179
|
**원격 호스트.** `/tfx-remote`는 `~/.config/triflux/hosts.json`에서 호스트를 읽는다
|
|
185
180
|
(Windows: `%APPDATA%\triflux\hosts.json`). 세션 시작은 `remote-spawn.mjs`의
|
|
@@ -199,11 +194,8 @@ graph TD
|
|
|
199
194
|
Route --> Claude[Claude Code]
|
|
200
195
|
Team --> Route
|
|
201
196
|
Live -->|UDS or tmux| Sessions[Claude / Codex TUI sessions]
|
|
202
|
-
Route -->
|
|
203
|
-
Team -->
|
|
204
|
-
Hub --> Store[(SQLite or memory store)]
|
|
205
|
-
Hub --> MCP[MCP tools]
|
|
206
|
-
Hub --> UI["HUD · claude agents panel"]
|
|
197
|
+
Route --> UI["HUD · claude agents panel"]
|
|
198
|
+
Team --> UI
|
|
207
199
|
CLI --> Lake[(".triflux/lake (tfx cto)")]
|
|
208
200
|
```
|
|
209
201
|
|
|
@@ -218,8 +210,8 @@ Package layout and execution paths: [ARCHITECTURE.md](ARCHITECTURE.md). Document
|
|
|
218
210
|
| Linux | tmux | Supported. |
|
|
219
211
|
| Windows | psmux + Windows Terminal | See below. |
|
|
220
212
|
|
|
221
|
-
**Windows.** psmux (a tmux fork) runs PowerShell by default.
|
|
222
|
-
|
|
213
|
+
**Windows.** psmux (a tmux fork) runs PowerShell by default. Callers do not run `wt.exe` or raw
|
|
214
|
+
`psmux kill-session` directly; tabs and panes go through the `tfx-wt` skill (set up only on
|
|
223
215
|
Windows) and `hub/team/wt-manager.mjs`. Agent rules:
|
|
224
216
|
[`.claude/rules/tfx-psmux.md`](.claude/rules/tfx-psmux.md).
|
|
225
217
|
|
|
@@ -227,9 +219,7 @@ Windows) and `hub/team/wt-manager.mjs`. Agent rules:
|
|
|
227
219
|
|
|
228
220
|
| Layer | Protection |
|
|
229
221
|
| --- | --- |
|
|
230
|
-
| Managed routes | Codex and Antigravity are called through `tfx-route.sh`,
|
|
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`). |
|
|
222
|
+
| 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
223
|
| MCP registry | Replaces stale or unsupported MCP entries with managed ones. |
|
|
234
224
|
| Consensus | Deep and consensus runs report degraded or disputed results instead of hiding them. |
|
|
235
225
|
|
|
@@ -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
|
|
6
|
+
argument-hint: "<start|ask|wait|queue|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
|
|
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 `--resume-last`는 Codex가 고른 thread를 사후에 찾는다. 띄운 뒤 공유 app-server daemon에 로드된 같은 cwd의 thread 중 rollout에 그 시각 이후의 resume 기록(`thread_settings_applied`)이 생긴 것이 정확히 하나이고 1.5초 뒤에도 같을 때만 `threadId`로 쓴다. 이 확인은 5초 안에 끝난다. TUI가 daemon을 쓰지 않거나 같은 cwd에서 동시에 resume이 일어나면 `null`이다. 기존 Codex UDS thread는 `tfx-live rename --cli codex --transport uds --thread ID --name "<이름>"`으로 이름을 바꾼다.
|
|
32
33
|
|
|
33
34
|
## 리드 운영
|
|
34
35
|
|
|
@@ -43,6 +44,26 @@ 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를 못 찾음(`start` 밖에서 `resume --last`로 띄운 세션, `start --resume-last`의 `threadId: null`, 같은 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
|
+
|
|
59
|
+
```bash
|
|
60
|
+
tfx-live queue --cli codex --session cx1
|
|
61
|
+
tfx-live queue --cli codex --session cx1 --request-id <requestId> --delete all
|
|
62
|
+
tfx-live queue --cli codex --thread <UUID> --delete <queuedMessageId>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`queue`는 TUI가 아직 가져가지 않은 항목을 보고 지운다. Codex app-server의 실험 API `thread/queue/list`·`thread/queue/delete`를 stdio로 호출하며 큐 저장소 파일은 건드리지 않는다. 목록 항목은 `id`(ask 결과의 `queuedMessageId`와 같다), `requestId`, `text`다. 삭제 결과의 `missing`은 이미 TUI가 가져갔거나 없는 항목이다. 유휴 TUI는 쌓인 항목을 곧 가져가므로 지울 수 있는 것은 사실상 바쁜 세션과 닫힌 세션의 항목이다. 가져간 뒤의 처리 여부는 `wait`로 확인한다.
|
|
66
|
+
|
|
46
67
|
### 컨텍스트 판단
|
|
47
68
|
|
|
48
69
|
분모는 공식 모델 창이고 실행 한도가 더 작으면 그 한도 아래에서 운영한다. 아래 비율은 공식 권고가 아닌 **[추론] 운영값**이다. 모델 문서가 바뀌면 한도도 갱신한다.
|
|
@@ -77,11 +98,19 @@ tfx-live stop --session cl1
|
|
|
77
98
|
```bash
|
|
78
99
|
tfx-live ask --cli claude --transport uds --short <8hex> --prompt "진행 상황을 보고해줘" --no-wait
|
|
79
100
|
tfx-live wait --cli claude --short <8hex> --request-id <requestId> --timeout 120 --poll-interval 500
|
|
101
|
+
tfx-live ask --cli claude --session cl1 --prompt "진행 상황을 보고해줘" --no-wait
|
|
102
|
+
tfx-live wait --cli claude --session cl1 --request-id <requestId> --timeout 120
|
|
103
|
+
tfx-live ask --cli codex --session cx1 --prompt "진행 상황을 보고해줘" --no-wait
|
|
104
|
+
tfx-live wait --cli codex --session cx1 --request-id <requestId> --timeout 120
|
|
80
105
|
```
|
|
81
106
|
|
|
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`가 해당 요청을 찾을 수 없다.
|
|
107
|
+
`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`가 해당 요청을 찾을 수 없다.
|
|
108
|
+
|
|
109
|
+
`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
110
|
|
|
84
|
-
|
|
111
|
+
tmux로 띄운 대화형 Claude는 `wait --session <tmux 대상>`을 쓴다. pane에 붙은 Claude 세션 기록(`~/.claude/sessions`)에서 sessionId를 찾아 같은 transcript 규칙으로 판정하고, daemon의 idle 대신 세션 기록의 `status: "idle"`을 쓴다. transcript는 처음 찾은 것을 끝까지 쓰므로 대기 중 `/clear`로 바뀐 세션은 따라가지 않는다. 로컬 전용이다.
|
|
112
|
+
|
|
113
|
+
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
114
|
|
|
86
115
|
명시한 `--config-dir`은 정확히 일치하는 daemon만 선택한다. `CLAUDE_CONFIG_DIR`도 해당 env 디렉터리로 제한한다. stale endpoint 복구는 같은 source configDir 안에서만 재시도한다. attach 전 예외는 `inputSent: false`이므로 `auto`의 tmux fallback이 가능하다. attach 뒤 전송 여부가 불명확하면 `status: "unknown"`으로 보고하고 재전송하지 않는다.
|
|
87
116
|
|
|
@@ -93,7 +122,7 @@ tfx-live wait --cli claude --short <8hex> --request-id <requestId> --timeout 120
|
|
|
93
122
|
|
|
94
123
|
`ask`와 tmux `interrupt`는 세션명, `name:window`, `name:window.pane`을 받는다. `start`와 tmux `stop --session`은 세션명만 받는다. `stop`은 pane·window 대상과 `%12`, `@3` 같은 ID를 거부한다. `--remote HOST`는 대상을 그대로 원격에 전달한다.
|
|
95
124
|
|
|
96
|
-
`ask`는 pane의 작업 상태와 Codex `model: loading`을 확인한다. tmux의 `--if-busy wait|fail|interrupt` 기본값은 `wait`다. `--busy-timeout` 기본값은 `--timeout`이고 `--poll-interval`은 밀리초다. timeout이면 프롬프트를 보내지 않는다. `interrupt`는 Escape 후 idle을 기다린다. 기존 입력 초안이 있으면 붙여넣기와 합쳐질 수 있으므로 전송 전 pane을 확인한다.
|
|
125
|
+
tmux `ask`는 pane의 작업 상태와 Codex `model: loading`을 확인한다. tmux의 `--if-busy wait|fail|interrupt` 기본값은 `wait`다. `--busy-timeout` 기본값은 `--timeout`이고 `--poll-interval`은 밀리초다. timeout이면 프롬프트를 보내지 않는다. `interrupt`는 Escape 후 idle을 기다린다. 기존 입력 초안이 있으면 붙여넣기와 합쳐질 수 있으므로 전송 전 pane을 확인한다.
|
|
97
126
|
|
|
98
127
|
### Codex UDS 스레드
|
|
99
128
|
|
|
@@ -106,17 +135,14 @@ tfx-live ask --cli codex --transport uds --thread auto --cwd ~/Projects/my-workt
|
|
|
106
135
|
|
|
107
136
|
`--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
137
|
|
|
109
|
-
## peer
|
|
138
|
+
## peer
|
|
110
139
|
|
|
111
140
|
```bash
|
|
112
141
|
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
142
|
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
143
|
```
|
|
116
144
|
|
|
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를 만든다.
|
|
145
|
+
`peer`는 이전 응답을 반대쪽의 다음 프롬프트로 전달한다. 기존 tmux pane은 `--attach-a`·`--attach-b`로 연결하며 종료하지 않는다. UDS 쪽도 기존 세션으로 취급한다. Codex tmux 쪽은 화면에서 응답을 읽으므로 queue가 아니라 tmux로 보낸다. `--if-busy-a`·`--if-busy-b`로 각 쪽의 정책을 정한다. 소유한 세션을 실제 종료한 경우에만 `stoppedA`·`stoppedB`가 참이다.
|
|
120
146
|
|
|
121
147
|
## 진단
|
|
122
148
|
|