triflux 7.1.3 → 7.2.1
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-plugin/marketplace.json +31 -31
- package/.claude-plugin/plugin.json +22 -23
- package/bin/triflux.mjs +18 -5
- package/hooks/keyword-rules.json +393 -361
- package/hub/bridge.mjs +799 -786
- package/hub/delegator/contracts.mjs +37 -38
- package/hub/delegator/schema/delegator-tools.schema.json +250 -250
- package/hub/delegator/service.mjs +307 -302
- package/hub/intent.mjs +108 -11
- package/hub/lib/process-utils.mjs +20 -0
- package/hub/pipe.mjs +589 -589
- package/hub/pipeline/gates/confidence.mjs +1 -1
- package/hub/pipeline/gates/selfcheck.mjs +2 -4
- package/hub/pipeline/state.mjs +191 -187
- package/hub/pipeline/transitions.mjs +124 -120
- package/hub/public/dashboard.html +355 -349
- package/hub/quality/deslop.mjs +5 -3
- package/hub/reflexion.mjs +5 -1
- package/hub/research.mjs +6 -1
- package/hub/router.mjs +791 -782
- package/hub/server.mjs +893 -822
- package/hub/store.mjs +807 -778
- package/hub/team/agent-map.json +10 -0
- package/hub/team/ansi.mjs +3 -4
- package/hub/team/cli/commands/control.mjs +43 -43
- package/hub/team/cli/commands/interrupt.mjs +36 -36
- package/hub/team/cli/commands/kill.mjs +3 -3
- package/hub/team/cli/commands/send.mjs +37 -37
- package/hub/team/cli/commands/start/index.mjs +18 -8
- package/hub/team/cli/commands/start/parse-args.mjs +3 -1
- package/hub/team/cli/commands/start/start-headless.mjs +4 -1
- package/hub/team/cli/commands/status.mjs +87 -87
- package/hub/team/cli/commands/stop.mjs +1 -1
- package/hub/team/cli/commands/task.mjs +1 -1
- package/hub/team/cli/index.mjs +41 -39
- package/hub/team/cli/manifest.mjs +29 -28
- package/hub/team/cli/services/hub-client.mjs +37 -0
- package/hub/team/cli/services/state-store.mjs +26 -12
- package/hub/team/dashboard.mjs +11 -4
- package/hub/team/handoff.mjs +12 -0
- package/hub/team/headless.mjs +202 -200
- package/hub/team/native-supervisor.mjs +386 -346
- package/hub/team/nativeProxy.mjs +680 -692
- package/hub/team/staleState.mjs +361 -369
- package/hub/team/tui-viewer.mjs +27 -3
- package/hub/team/tui.mjs +1 -0
- package/hub/token-mode.mjs +114 -24
- package/hub/workers/delegator-mcp.mjs +1059 -1057
- package/hud/colors.mjs +88 -0
- package/hud/constants.mjs +78 -0
- package/hud/hud-qos-status.mjs +206 -1872
- package/hud/providers/claude.mjs +309 -0
- package/hud/providers/codex.mjs +151 -0
- package/hud/providers/gemini.mjs +320 -0
- package/hud/renderers.mjs +424 -0
- package/hud/terminal.mjs +140 -0
- package/hud/utils.mjs +271 -0
- package/package.json +1 -2
- package/scripts/__tests__/keyword-detector.test.mjs +234 -234
- package/scripts/headless-guard-fast.sh +21 -0
- package/scripts/headless-guard.mjs +26 -6
- package/scripts/lib/keyword-rules.mjs +166 -168
- package/scripts/setup.mjs +720 -690
- package/scripts/tfx-route-post.mjs +424 -424
- package/scripts/tfx-route.sh +1663 -1650
- package/scripts/tmp-cleanup.mjs +74 -0
- package/skills/tfx-auto/SKILL.md +279 -278
- package/skills/tfx-auto-codex/SKILL.md +98 -77
- package/skills/tfx-codex/SKILL.md +65 -65
- package/skills/tfx-gemini/SKILL.md +83 -82
- package/skills/tfx-hub/SKILL.md +205 -136
- package/skills/tfx-multi/SKILL.md +11 -5
- package/.mcp.json +0 -8
package/hub/quality/deslop.mjs
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { readdir, readFile, writeFile, stat } from 'node:fs/promises';
|
|
7
7
|
import { join, relative } from 'node:path';
|
|
8
8
|
|
|
9
|
-
/** @type {
|
|
10
|
-
export const SLOP_PATTERNS = [
|
|
9
|
+
/** @type {ReadonlyArray<{type: string, pattern: RegExp, severity: string, autoFixable: boolean, multiline: boolean}>} */
|
|
10
|
+
export const SLOP_PATTERNS = Object.freeze([
|
|
11
11
|
{
|
|
12
12
|
type: 'trivial_comment',
|
|
13
13
|
pattern: /^\s*\/\/\s*(import|define|set|get|return|export)\s/i,
|
|
@@ -57,7 +57,7 @@ export const SLOP_PATTERNS = [
|
|
|
57
57
|
autoFixable: true,
|
|
58
58
|
multiline: false,
|
|
59
59
|
},
|
|
60
|
-
];
|
|
60
|
+
]);
|
|
61
61
|
|
|
62
62
|
const SEVERITY_WEIGHT = { low: 2, med: 5 };
|
|
63
63
|
|
|
@@ -82,6 +82,7 @@ export function detectSlop(content, filePath = '') {
|
|
|
82
82
|
suggestion: `${sp.type} 패턴 감지`,
|
|
83
83
|
text: lines[i].trim(),
|
|
84
84
|
autoFixable: sp.autoFixable,
|
|
85
|
+
file: filePath,
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
}
|
|
@@ -100,6 +101,7 @@ export function detectSlop(content, filePath = '') {
|
|
|
100
101
|
suggestion: `${sp.type} 패턴 감지`,
|
|
101
102
|
text: match[0].split('\n')[0].trim(),
|
|
102
103
|
autoFixable: sp.autoFixable,
|
|
104
|
+
file: filePath,
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
107
|
}
|
package/hub/reflexion.mjs
CHANGED
|
@@ -68,13 +68,17 @@ export function learnFromError(store, { error, solution, context = {}, success =
|
|
|
68
68
|
return store.updateReflexionHit(existing[0].id, success);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
const newEntry = store.addReflexion({
|
|
72
72
|
error_pattern: pattern,
|
|
73
73
|
error_message: error,
|
|
74
74
|
context,
|
|
75
75
|
solution,
|
|
76
76
|
solution_code: null,
|
|
77
77
|
});
|
|
78
|
+
if (success && newEntry) {
|
|
79
|
+
return store.updateReflexionHit(newEntry.id, true);
|
|
80
|
+
}
|
|
81
|
+
return newEntry;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
/**
|
package/hub/research.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// 검색 쿼리 생성 → 결과 정규화 → 보고서 빌드 → 저장
|
|
3
3
|
|
|
4
4
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
5
|
-
import { join } from 'node:path';
|
|
5
|
+
import { join, resolve } from 'node:path';
|
|
6
6
|
import { TFX_REPORTS_DIR } from './paths.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -103,6 +103,11 @@ ${sourcesSection || '_출처 없음_'}
|
|
|
103
103
|
*/
|
|
104
104
|
export function saveReport(topic, content, baseDir = process.cwd()) {
|
|
105
105
|
const dir = join(baseDir, TFX_REPORTS_DIR);
|
|
106
|
+
const resolvedDir = resolve(dir);
|
|
107
|
+
const expectedBase = resolve(baseDir || TFX_REPORTS_DIR);
|
|
108
|
+
if (!resolvedDir.startsWith(expectedBase)) {
|
|
109
|
+
throw new Error('Invalid report directory: path traversal detected');
|
|
110
|
+
}
|
|
106
111
|
mkdirSync(dir, { recursive: true });
|
|
107
112
|
|
|
108
113
|
const ts = new Date().toISOString().replace(/[:.]/g, '-').replace('T', '_').slice(0, 19);
|