triflux 3.3.0-dev.3 → 3.3.0-dev.6
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/hub/assign-callbacks.mjs +136 -0
- package/hub/bridge.mjs +289 -98
- package/hub/pipe.mjs +81 -0
- package/hub/server.mjs +159 -133
- package/hub/store.mjs +36 -2
- package/hub/team/cli-team-status.mjs +17 -3
- package/hub/team/native-supervisor.mjs +62 -22
- package/hub/team/native.mjs +266 -200
- package/hub/team/nativeProxy.mjs +173 -72
- package/hub/tools.mjs +6 -6
- package/hub/workers/delegator-mcp.mjs +285 -140
- package/package.json +60 -60
- package/scripts/completions/tfx.bash +47 -0
- package/scripts/completions/tfx.fish +44 -0
- package/scripts/completions/tfx.zsh +83 -0
- package/scripts/lib/mcp-filter.mjs +642 -0
- package/scripts/lib/mcp-server-catalog.mjs +118 -0
- package/scripts/mcp-check.mjs +126 -88
- package/scripts/test-tfx-route-no-claude-native.mjs +10 -2
- package/scripts/tfx-route.sh +504 -180
- package/skills/tfx-auto/SKILL.md +6 -1
package/package.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "triflux",
|
|
3
|
-
"version": "3.3.0-dev.
|
|
4
|
-
"description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"triflux": "bin/triflux.mjs",
|
|
8
|
-
"tfx": "bin/triflux.mjs",
|
|
9
|
-
"tfl": "bin/triflux.mjs",
|
|
10
|
-
"tfx-setup": "bin/tfx-setup.mjs",
|
|
11
|
-
"tfx-doctor": "bin/tfx-doctor.mjs"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"bin",
|
|
15
|
-
"hub",
|
|
16
|
-
"skills",
|
|
17
|
-
"!**/failure-reports",
|
|
18
|
-
"scripts",
|
|
19
|
-
"hooks",
|
|
20
|
-
"hud",
|
|
21
|
-
".claude-plugin",
|
|
22
|
-
".mcp.json",
|
|
23
|
-
"README.md",
|
|
24
|
-
"README.ko.md",
|
|
25
|
-
"LICENSE"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"setup": "node scripts/setup.mjs",
|
|
29
|
-
"postinstall": "node scripts/setup.mjs",
|
|
30
|
-
"test": "node --test tests/**/*.test.mjs",
|
|
31
|
-
"test:unit": "node --test tests/unit/**/*.test.mjs",
|
|
32
|
-
"test:integration": "node --test tests/integration/**/*.test.mjs",
|
|
33
|
-
"test:route-smoke": "node --test scripts/test-tfx-route-no-claude-native.mjs"
|
|
34
|
-
},
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=18.0.0"
|
|
37
|
-
},
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/tellang/triflux.git"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/tellang/triflux#readme",
|
|
43
|
-
"author": "tellang",
|
|
44
|
-
"license": "MIT",
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"better-sqlite3": "^12.6.2",
|
|
47
|
-
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
48
|
-
},
|
|
49
|
-
"keywords": [
|
|
50
|
-
"claude-code",
|
|
51
|
-
"plugin",
|
|
52
|
-
"codex",
|
|
53
|
-
"gemini",
|
|
54
|
-
"cli-routing",
|
|
55
|
-
"orchestration",
|
|
56
|
-
"multi-model",
|
|
57
|
-
"triflux",
|
|
58
|
-
"tfx"
|
|
59
|
-
]
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "triflux",
|
|
3
|
+
"version": "3.3.0-dev.6",
|
|
4
|
+
"description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"triflux": "bin/triflux.mjs",
|
|
8
|
+
"tfx": "bin/triflux.mjs",
|
|
9
|
+
"tfl": "bin/triflux.mjs",
|
|
10
|
+
"tfx-setup": "bin/tfx-setup.mjs",
|
|
11
|
+
"tfx-doctor": "bin/tfx-doctor.mjs"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"hub",
|
|
16
|
+
"skills",
|
|
17
|
+
"!**/failure-reports",
|
|
18
|
+
"scripts",
|
|
19
|
+
"hooks",
|
|
20
|
+
"hud",
|
|
21
|
+
".claude-plugin",
|
|
22
|
+
".mcp.json",
|
|
23
|
+
"README.md",
|
|
24
|
+
"README.ko.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"setup": "node scripts/setup.mjs",
|
|
29
|
+
"postinstall": "node scripts/setup.mjs",
|
|
30
|
+
"test": "node --test --test-force-exit --test-concurrency=1 \"tests/**/*.test.mjs\" \"scripts/__tests__/**/*.test.mjs\"",
|
|
31
|
+
"test:unit": "node --test --test-force-exit --test-concurrency=1 tests/unit/**/*.test.mjs",
|
|
32
|
+
"test:integration": "node --test --test-force-exit --test-concurrency=1 tests/integration/**/*.test.mjs",
|
|
33
|
+
"test:route-smoke": "node --test scripts/test-tfx-route-no-claude-native.mjs"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18.0.0"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/tellang/triflux.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/tellang/triflux#readme",
|
|
43
|
+
"author": "tellang",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"better-sqlite3": "^12.6.2",
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"claude-code",
|
|
51
|
+
"plugin",
|
|
52
|
+
"codex",
|
|
53
|
+
"gemini",
|
|
54
|
+
"cli-routing",
|
|
55
|
+
"orchestration",
|
|
56
|
+
"multi-model",
|
|
57
|
+
"triflux",
|
|
58
|
+
"tfx"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Installation: source /path/to/tfx.bash 또는 ~/.bashrc에 추가
|
|
3
|
+
|
|
4
|
+
_tfx_completion() {
|
|
5
|
+
local cur prev words cword
|
|
6
|
+
COMPREPLY=()
|
|
7
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
8
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
9
|
+
words=("${COMP_WORDS[@]}")
|
|
10
|
+
cword=$COMP_CWORD
|
|
11
|
+
|
|
12
|
+
local commands="setup doctor multi hub auto codex gemini"
|
|
13
|
+
local multi_cmds="status stop kill attach list"
|
|
14
|
+
local hub_cmds="start stop status restart"
|
|
15
|
+
local flags="--thorough --quick --tmux --psmux --agents --no-attach --timeout"
|
|
16
|
+
|
|
17
|
+
if [[ $cword -eq 1 ]]; then
|
|
18
|
+
COMPREPLY=( $(compgen -W "${commands}" -- "$cur") )
|
|
19
|
+
return 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
local cmd="${words[1]}"
|
|
23
|
+
case "${cmd}" in
|
|
24
|
+
multi)
|
|
25
|
+
if [[ $cword -eq 2 && ! "$cur" == -* ]]; then
|
|
26
|
+
COMPREPLY=( $(compgen -W "${multi_cmds}" -- "$cur") )
|
|
27
|
+
else
|
|
28
|
+
COMPREPLY=( $(compgen -W "${flags}" -- "$cur") )
|
|
29
|
+
fi
|
|
30
|
+
;;
|
|
31
|
+
hub)
|
|
32
|
+
if [[ $cword -eq 2 ]]; then
|
|
33
|
+
COMPREPLY=( $(compgen -W "${hub_cmds}" -- "$cur") )
|
|
34
|
+
fi
|
|
35
|
+
;;
|
|
36
|
+
doctor)
|
|
37
|
+
COMPREPLY=( $(compgen -W "--fix --reset" -- "$cur") )
|
|
38
|
+
;;
|
|
39
|
+
setup|auto|codex|gemini)
|
|
40
|
+
if [[ "$cur" == -* ]]; then
|
|
41
|
+
COMPREPLY=( $(compgen -W "${flags}" -- "$cur") )
|
|
42
|
+
fi
|
|
43
|
+
;;
|
|
44
|
+
esac
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
complete -F _tfx_completion tfx
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Installation: ~/.config/fish/completions/에 복사
|
|
2
|
+
# e.g., cp /path/to/tfx.fish ~/.config/fish/completions/tfx.fish
|
|
3
|
+
|
|
4
|
+
set -l commands setup doctor multi hub auto codex gemini
|
|
5
|
+
set -l multi_cmds status stop kill attach list
|
|
6
|
+
set -l hub_cmds start stop status restart
|
|
7
|
+
|
|
8
|
+
complete -c tfx -f
|
|
9
|
+
|
|
10
|
+
# Subcommands
|
|
11
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "setup" -d "Setup and sync files"
|
|
12
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "doctor" -d "Diagnose CLI and issues"
|
|
13
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "multi" -d "Multi-CLI team mode"
|
|
14
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "hub" -d "MCP message bus management"
|
|
15
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "auto" -d "Auto mode"
|
|
16
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "codex" -d "Codex mode"
|
|
17
|
+
complete -c tfx -n "not __fish_seen_subcommand_from $commands" -a "gemini" -d "Gemini mode"
|
|
18
|
+
|
|
19
|
+
# Doctor flags
|
|
20
|
+
complete -c tfx -n "__fish_seen_subcommand_from doctor" -l fix -d "Auto fix issues"
|
|
21
|
+
complete -c tfx -n "__fish_seen_subcommand_from doctor" -l reset -d "Reset all caches"
|
|
22
|
+
|
|
23
|
+
# Multi subcommands
|
|
24
|
+
complete -c tfx -n "__fish_seen_subcommand_from multi; and not __fish_seen_subcommand_from $multi_cmds" -a "status"
|
|
25
|
+
complete -c tfx -n "__fish_seen_subcommand_from multi; and not __fish_seen_subcommand_from $multi_cmds" -a "stop"
|
|
26
|
+
complete -c tfx -n "__fish_seen_subcommand_from multi; and not __fish_seen_subcommand_from $multi_cmds" -a "kill"
|
|
27
|
+
complete -c tfx -n "__fish_seen_subcommand_from multi; and not __fish_seen_subcommand_from $multi_cmds" -a "attach"
|
|
28
|
+
complete -c tfx -n "__fish_seen_subcommand_from multi; and not __fish_seen_subcommand_from $multi_cmds" -a "list"
|
|
29
|
+
|
|
30
|
+
# Hub subcommands
|
|
31
|
+
complete -c tfx -n "__fish_seen_subcommand_from hub; and not __fish_seen_subcommand_from $hub_cmds" -a "start"
|
|
32
|
+
complete -c tfx -n "__fish_seen_subcommand_from hub; and not __fish_seen_subcommand_from $hub_cmds" -a "stop"
|
|
33
|
+
complete -c tfx -n "__fish_seen_subcommand_from hub; and not __fish_seen_subcommand_from $hub_cmds" -a "status"
|
|
34
|
+
complete -c tfx -n "__fish_seen_subcommand_from hub; and not __fish_seen_subcommand_from $hub_cmds" -a "restart"
|
|
35
|
+
|
|
36
|
+
# Global or multi flags
|
|
37
|
+
set -l flags_cond "__fish_seen_subcommand_from setup multi auto codex gemini"
|
|
38
|
+
complete -c tfx -n "$flags_cond" -l thorough -d "Thorough execution"
|
|
39
|
+
complete -c tfx -n "$flags_cond" -l quick -d "Quick execution"
|
|
40
|
+
complete -c tfx -n "$flags_cond" -l tmux -d "Use tmux"
|
|
41
|
+
complete -c tfx -n "$flags_cond" -l psmux -d "Use psmux"
|
|
42
|
+
complete -c tfx -n "$flags_cond" -l agents -d "Specify agents"
|
|
43
|
+
complete -c tfx -n "$flags_cond" -l no-attach -d "Do not attach"
|
|
44
|
+
complete -c tfx -n "$flags_cond" -l timeout -d "Set timeout"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#compdef tfx
|
|
2
|
+
# Installation: fpath에 추가 후 compinit
|
|
3
|
+
# e.g., fpath=(/path/to/dir $fpath) && compinit
|
|
4
|
+
|
|
5
|
+
_tfx() {
|
|
6
|
+
local line state
|
|
7
|
+
local -a commands multi_cmds hub_cmds flags
|
|
8
|
+
|
|
9
|
+
commands=(
|
|
10
|
+
'setup:Setup and sync files'
|
|
11
|
+
'doctor:Diagnose CLI and issues'
|
|
12
|
+
'multi:Multi-CLI team mode'
|
|
13
|
+
'hub:MCP message bus management'
|
|
14
|
+
'auto:Auto mode'
|
|
15
|
+
'codex:Codex mode'
|
|
16
|
+
'gemini:Gemini mode'
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
multi_cmds=(
|
|
20
|
+
'status:Show status'
|
|
21
|
+
'stop:Stop multi'
|
|
22
|
+
'kill:Kill multi'
|
|
23
|
+
'attach:Attach to multi'
|
|
24
|
+
'list:List multi sessions'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
hub_cmds=(
|
|
28
|
+
'start:Start hub'
|
|
29
|
+
'stop:Stop hub'
|
|
30
|
+
'status:Show hub status'
|
|
31
|
+
'restart:Restart hub'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
_arguments -C \
|
|
35
|
+
'1: :->cmds' \
|
|
36
|
+
'*: :->args'
|
|
37
|
+
|
|
38
|
+
case $state in
|
|
39
|
+
cmds)
|
|
40
|
+
_describe -t commands 'tfx commands' commands
|
|
41
|
+
;;
|
|
42
|
+
args)
|
|
43
|
+
case $words[2] in
|
|
44
|
+
multi)
|
|
45
|
+
if (( CURRENT == 3 )) && [[ $words[CURRENT] != -* ]]; then
|
|
46
|
+
_describe -t multi_cmds 'multi commands' multi_cmds
|
|
47
|
+
else
|
|
48
|
+
_arguments \
|
|
49
|
+
'--thorough[Thorough execution]' \
|
|
50
|
+
'--quick[Quick execution]' \
|
|
51
|
+
'--tmux[Use tmux]' \
|
|
52
|
+
'--psmux[Use psmux]' \
|
|
53
|
+
'--agents[Specify agents]' \
|
|
54
|
+
'--no-attach[Do not attach]' \
|
|
55
|
+
'--timeout[Set timeout]'
|
|
56
|
+
fi
|
|
57
|
+
;;
|
|
58
|
+
hub)
|
|
59
|
+
if (( CURRENT == 3 )); then
|
|
60
|
+
_describe -t hub_cmds 'hub commands' hub_cmds
|
|
61
|
+
fi
|
|
62
|
+
;;
|
|
63
|
+
doctor)
|
|
64
|
+
_arguments \
|
|
65
|
+
'--fix[Auto fix issues]' \
|
|
66
|
+
'--reset[Reset all caches]'
|
|
67
|
+
;;
|
|
68
|
+
*)
|
|
69
|
+
_arguments \
|
|
70
|
+
'--thorough[Thorough execution]' \
|
|
71
|
+
'--quick[Quick execution]' \
|
|
72
|
+
'--tmux[Use tmux]' \
|
|
73
|
+
'--psmux[Use psmux]' \
|
|
74
|
+
'--agents[Specify agents]' \
|
|
75
|
+
'--no-attach[Do not attach]' \
|
|
76
|
+
'--timeout[Set timeout]'
|
|
77
|
+
;;
|
|
78
|
+
esac
|
|
79
|
+
;;
|
|
80
|
+
esac
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
_tfx "$@"
|