triflux 3.3.0-dev.7 → 4.0.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 (91) hide show
  1. package/README.ko.md +108 -199
  2. package/README.md +108 -199
  3. package/bin/triflux.mjs +2415 -1762
  4. package/hooks/keyword-rules.json +361 -354
  5. package/hooks/pipeline-stop.mjs +5 -2
  6. package/hub/assign-callbacks.mjs +136 -136
  7. package/hub/bridge.mjs +734 -708
  8. package/hub/delegator/contracts.mjs +38 -0
  9. package/hub/delegator/index.mjs +14 -0
  10. package/hub/delegator/schema/delegator-tools.schema.json +250 -0
  11. package/hub/delegator/service.mjs +302 -0
  12. package/hub/delegator/tool-definitions.mjs +35 -0
  13. package/hub/hitl.mjs +67 -67
  14. package/hub/paths.mjs +28 -0
  15. package/hub/pipe.mjs +589 -561
  16. package/hub/pipeline/state.mjs +23 -0
  17. package/hub/public/dashboard.html +349 -0
  18. package/hub/public/tray-icon.ico +0 -0
  19. package/hub/public/tray-icon.png +0 -0
  20. package/hub/router.mjs +782 -782
  21. package/hub/schema.sql +40 -40
  22. package/hub/server.mjs +810 -637
  23. package/hub/store.mjs +706 -706
  24. package/hub/team/cli/commands/attach.mjs +37 -0
  25. package/hub/team/cli/commands/control.mjs +43 -0
  26. package/hub/team/cli/commands/debug.mjs +74 -0
  27. package/hub/team/cli/commands/focus.mjs +53 -0
  28. package/hub/team/cli/commands/interrupt.mjs +36 -0
  29. package/hub/team/cli/commands/kill.mjs +37 -0
  30. package/hub/team/cli/commands/list.mjs +24 -0
  31. package/hub/team/cli/commands/send.mjs +37 -0
  32. package/hub/team/cli/commands/start/index.mjs +87 -0
  33. package/hub/team/cli/commands/start/parse-args.mjs +32 -0
  34. package/hub/team/cli/commands/start/start-in-process.mjs +40 -0
  35. package/hub/team/cli/commands/start/start-mux.mjs +73 -0
  36. package/hub/team/cli/commands/start/start-wt.mjs +69 -0
  37. package/hub/team/cli/commands/status.mjs +87 -0
  38. package/hub/team/cli/commands/stop.mjs +31 -0
  39. package/hub/team/cli/commands/task.mjs +30 -0
  40. package/hub/team/cli/commands/tasks.mjs +13 -0
  41. package/hub/team/{cli.mjs → cli/help.mjs} +38 -99
  42. package/hub/team/cli/index.mjs +39 -0
  43. package/hub/team/cli/manifest.mjs +28 -0
  44. package/hub/team/cli/render.mjs +30 -0
  45. package/hub/team/cli/services/attach-fallback.mjs +54 -0
  46. package/hub/team/cli/services/hub-client.mjs +171 -0
  47. package/hub/team/cli/services/member-selector.mjs +30 -0
  48. package/hub/team/cli/services/native-control.mjs +115 -0
  49. package/hub/team/cli/services/runtime-mode.mjs +60 -0
  50. package/hub/team/cli/services/state-store.mjs +34 -0
  51. package/hub/team/cli/services/task-model.mjs +30 -0
  52. package/hub/team/native-supervisor.mjs +69 -63
  53. package/hub/team/native.mjs +367 -266
  54. package/hub/team/nativeProxy.mjs +217 -173
  55. package/hub/team/pane.mjs +149 -149
  56. package/hub/team/psmux.mjs +946 -946
  57. package/hub/team/session.mjs +608 -608
  58. package/hub/team/staleState.mjs +369 -299
  59. package/hub/tools.mjs +107 -107
  60. package/hub/tray.mjs +332 -0
  61. package/hub/workers/claude-worker.mjs +446 -446
  62. package/hub/workers/codex-mcp.mjs +414 -414
  63. package/hub/workers/delegator-mcp.mjs +1045 -1045
  64. package/hub/workers/factory.mjs +21 -21
  65. package/hub/workers/gemini-worker.mjs +349 -349
  66. package/hub/workers/interface.mjs +41 -41
  67. package/package.json +61 -60
  68. package/scripts/__tests__/keyword-detector.test.mjs +234 -234
  69. package/scripts/hub-ensure.mjs +102 -101
  70. package/scripts/keyword-detector.mjs +272 -272
  71. package/scripts/keyword-rules-expander.mjs +521 -521
  72. package/scripts/lib/keyword-rules.mjs +168 -168
  73. package/scripts/lib/mcp-filter.mjs +642 -642
  74. package/scripts/lib/mcp-server-catalog.mjs +118 -118
  75. package/scripts/mcp-check.mjs +126 -126
  76. package/scripts/preflight-cache.mjs +19 -0
  77. package/scripts/run.cjs +62 -62
  78. package/scripts/setup.mjs +68 -31
  79. package/scripts/test-tfx-route-no-claude-native.mjs +57 -57
  80. package/scripts/tfx-route-worker.mjs +161 -161
  81. package/scripts/tfx-route.sh +1360 -1326
  82. package/skills/tfx-auto/SKILL.md +196 -196
  83. package/skills/tfx-auto-codex/SKILL.md +77 -77
  84. package/skills/tfx-multi/SKILL.md +378 -378
  85. package/hub/team/cli-team-common.mjs +0 -348
  86. package/hub/team/cli-team-control.mjs +0 -393
  87. package/hub/team/cli-team-start.mjs +0 -516
  88. package/hub/team/cli-team-status.mjs +0 -283
  89. package/skills/auto-verify/SKILL.md +0 -145
  90. package/skills/manage-skills/SKILL.md +0 -192
  91. package/skills/verify-implementation/SKILL.md +0 -138
@@ -1,41 +1,41 @@
1
- // hub/workers/interface.mjs — Worker 공통 인터페이스 정의
2
-
3
- /**
4
- * 워커 실행 옵션
5
- * @typedef {object} WorkerExecuteOptions
6
- * @property {string} [cwd] - 워커 작업 디렉터리
7
- * @property {string} [sessionKey] - 내부 세션 키
8
- * @property {string} [threadId] - 외부에서 지정한 Codex threadId
9
- * @property {boolean} [resetSession] - 기존 세션을 무시하고 새 세션 시작 여부
10
- * @property {string} [model] - Codex 모델 이름
11
- * @property {string} [profile] - Codex 프로필 이름
12
- * @property {'untrusted'|'on-failure'|'on-request'|'never'} [approvalPolicy] - 승인 정책
13
- * @property {'read-only'|'workspace-write'|'danger-full-access'} [sandbox] - 샌드박스 정책
14
- * @property {Record<string, unknown>} [config] - 추가 Codex 설정
15
- * @property {string} [baseInstructions] - 기본 시스템 지침
16
- * @property {string} [developerInstructions] - 개발자 지침
17
- * @property {string} [compactPrompt] - 컴팩션 프롬프트
18
- * @property {number} [timeoutMs] - MCP 요청 타임아웃(ms)
19
- */
20
-
21
- /**
22
- * 워커 실행 결과
23
- * @typedef {object} WorkerResult
24
- * @property {string} output - 최종 텍스트 출력
25
- * @property {number} exitCode - 종료 코드(0=성공)
26
- * @property {string | null} [threadId] - Codex 세션 threadId
27
- * @property {string | null} [sessionKey] - 내부 세션 키
28
- * @property {unknown} [raw] - 원본 tool call 결과
29
- */
30
-
31
- /**
32
- * 공통 워커 인터페이스
33
- * @typedef {object} IWorker
34
- * @property {(prompt: string, opts?: WorkerExecuteOptions) => Promise<WorkerResult>} execute
35
- * @property {() => Promise<void>} start
36
- * @property {() => Promise<void>} stop
37
- * @property {() => boolean} isReady
38
- * @property {string} type - 'codex' | 'gemini' | 'claude' | 'delegator'
39
- */
40
-
41
- export const WORKER_TYPES = Object.freeze(['codex', 'gemini', 'claude', 'delegator']);
1
+ // hub/workers/interface.mjs — Worker 공통 인터페이스 정의
2
+
3
+ /**
4
+ * 워커 실행 옵션
5
+ * @typedef {object} WorkerExecuteOptions
6
+ * @property {string} [cwd] - 워커 작업 디렉터리
7
+ * @property {string} [sessionKey] - 내부 세션 키
8
+ * @property {string} [threadId] - 외부에서 지정한 Codex threadId
9
+ * @property {boolean} [resetSession] - 기존 세션을 무시하고 새 세션 시작 여부
10
+ * @property {string} [model] - Codex 모델 이름
11
+ * @property {string} [profile] - Codex 프로필 이름
12
+ * @property {'untrusted'|'on-failure'|'on-request'|'never'} [approvalPolicy] - 승인 정책
13
+ * @property {'read-only'|'workspace-write'|'danger-full-access'} [sandbox] - 샌드박스 정책
14
+ * @property {Record<string, unknown>} [config] - 추가 Codex 설정
15
+ * @property {string} [baseInstructions] - 기본 시스템 지침
16
+ * @property {string} [developerInstructions] - 개발자 지침
17
+ * @property {string} [compactPrompt] - 컴팩션 프롬프트
18
+ * @property {number} [timeoutMs] - MCP 요청 타임아웃(ms)
19
+ */
20
+
21
+ /**
22
+ * 워커 실행 결과
23
+ * @typedef {object} WorkerResult
24
+ * @property {string} output - 최종 텍스트 출력
25
+ * @property {number} exitCode - 종료 코드(0=성공)
26
+ * @property {string | null} [threadId] - Codex 세션 threadId
27
+ * @property {string | null} [sessionKey] - 내부 세션 키
28
+ * @property {unknown} [raw] - 원본 tool call 결과
29
+ */
30
+
31
+ /**
32
+ * 공통 워커 인터페이스
33
+ * @typedef {object} IWorker
34
+ * @property {(prompt: string, opts?: WorkerExecuteOptions) => Promise<WorkerResult>} execute
35
+ * @property {() => Promise<void>} start
36
+ * @property {() => Promise<void>} stop
37
+ * @property {() => boolean} isReady
38
+ * @property {string} type - 'codex' | 'gemini' | 'claude' | 'delegator'
39
+ */
40
+
41
+ export const WORKER_TYPES = Object.freeze(['codex', 'gemini', 'claude', 'delegator']);
package/package.json CHANGED
@@ -1,60 +1,61 @@
1
- {
2
- "name": "triflux",
3
- "version": "3.3.0-dev.7",
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
- }
1
+ {
2
+ "name": "triflux",
3
+ "version": "4.0.0",
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
+ "@modelcontextprotocol/sdk": "^1.27.1",
47
+ "better-sqlite3": "^12.6.2",
48
+ "systray2": "^2.1.4"
49
+ },
50
+ "keywords": [
51
+ "claude-code",
52
+ "plugin",
53
+ "codex",
54
+ "gemini",
55
+ "cli-routing",
56
+ "orchestration",
57
+ "multi-model",
58
+ "triflux",
59
+ "tfx"
60
+ ]
61
+ }