@triflux/core 10.67.1 → 10.69.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/hub/team/agent-map.json
CHANGED
package/package.json
CHANGED
|
@@ -408,13 +408,13 @@ async function runCli() {
|
|
|
408
408
|
const module = await import(pathToFileURL(geminiProfilesModule).href);
|
|
409
409
|
resolver = (agent) => {
|
|
410
410
|
try {
|
|
411
|
-
return module.resolveGeminiProfileForPurpose(agent) || "
|
|
411
|
+
return module.resolveGeminiProfileForPurpose(agent) || "argon";
|
|
412
412
|
} catch {
|
|
413
|
-
return "
|
|
413
|
+
return "argon";
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
} catch {
|
|
417
|
-
resolver = () => "
|
|
417
|
+
resolver = () => "argon";
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
process.stdout.write(
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { copyFileSync, existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
AGY_FAMILY_PROFILES,
|
|
5
5
|
modelFamilyPaths,
|
|
6
6
|
resolveModelFamilies,
|
|
7
7
|
writeModelFile,
|
|
8
8
|
} from "./model-family-resolver.mjs";
|
|
9
9
|
|
|
10
10
|
const DEFAULT_GEMINI_PROFILES = {
|
|
11
|
-
model:
|
|
11
|
+
model: AGY_FAMILY_PROFILES.argon.model,
|
|
12
12
|
profiles: Object.fromEntries(
|
|
13
|
-
Object.entries(
|
|
13
|
+
Object.entries(AGY_FAMILY_PROFILES).map(([name, { model }]) => [
|
|
14
14
|
name,
|
|
15
15
|
{ model },
|
|
16
16
|
]),
|
|
@@ -19,46 +19,47 @@ const DEFAULT_GEMINI_PROFILES = {
|
|
|
19
19
|
|
|
20
20
|
export function normalizeGeminiProfileName(name) {
|
|
21
21
|
const raw = String(name ?? "").trim();
|
|
22
|
-
|
|
22
|
+
// Flash 가족은 뺐다. 옛 Flash 이름은 effort 와 상관없이 더 빠른 Argon Low 로 보낸다.
|
|
23
|
+
return raw.replace(/^flash\d*(?:_(?:low|high))?$/, "argon_low");
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
// ── 용도별 effort (SSOT) ──
|
|
26
|
-
//
|
|
27
|
+
// Argon 가족 안에서 역할에 따라 effort 를 나눈다. 키는 tfx 에이전트/역할 이름
|
|
27
28
|
// (agent-map.json 의 에이전트, tfx multi --assign 의 role). bash(tfx-route.sh)와
|
|
28
29
|
// 실행 모드(execution-mode)가 이 표를 읽는다.
|
|
29
30
|
// High : 판단이 결과를 좌우하는 역할 (검토, 설계, 디버깅, 분석)
|
|
30
31
|
// Medium : 생성/작성/실행 (기본값)
|
|
31
32
|
// Low : 분류, 요약, 추출, 번역처럼 짧고 기계적인 작업
|
|
32
33
|
const GEMINI_PROFILE_BY_PURPOSE = Object.freeze({
|
|
33
|
-
designer: "
|
|
34
|
-
reviewer: "
|
|
35
|
-
"code-reviewer": "
|
|
36
|
-
"security-reviewer": "
|
|
37
|
-
"quality-reviewer": "
|
|
38
|
-
critic: "
|
|
39
|
-
architect: "
|
|
40
|
-
verifier: "
|
|
41
|
-
analyst: "
|
|
42
|
-
debugger: "
|
|
43
|
-
planner: "
|
|
44
|
-
scientist: "
|
|
45
|
-
"test-engineer": "
|
|
46
|
-
writer: "
|
|
47
|
-
executor: "
|
|
48
|
-
worker: "
|
|
49
|
-
"document-specialist": "
|
|
50
|
-
researcher: "
|
|
51
|
-
antigravity: "
|
|
52
|
-
agy: "
|
|
53
|
-
gemini: "
|
|
54
|
-
summarizer: "
|
|
55
|
-
classifier: "
|
|
56
|
-
triage: "
|
|
57
|
-
translator: "
|
|
58
|
-
formatter: "
|
|
59
|
-
explore: "
|
|
34
|
+
designer: "argon_high",
|
|
35
|
+
reviewer: "argon_high",
|
|
36
|
+
"code-reviewer": "argon_high",
|
|
37
|
+
"security-reviewer": "argon_high",
|
|
38
|
+
"quality-reviewer": "argon_high",
|
|
39
|
+
critic: "argon_high",
|
|
40
|
+
architect: "argon_high",
|
|
41
|
+
verifier: "argon_high",
|
|
42
|
+
analyst: "argon_high",
|
|
43
|
+
debugger: "argon_high",
|
|
44
|
+
planner: "argon_high",
|
|
45
|
+
scientist: "argon_high",
|
|
46
|
+
"test-engineer": "argon_high",
|
|
47
|
+
writer: "argon",
|
|
48
|
+
executor: "argon",
|
|
49
|
+
worker: "argon",
|
|
50
|
+
"document-specialist": "argon",
|
|
51
|
+
researcher: "argon",
|
|
52
|
+
antigravity: "argon",
|
|
53
|
+
agy: "argon",
|
|
54
|
+
gemini: "argon",
|
|
55
|
+
summarizer: "argon_low",
|
|
56
|
+
classifier: "argon_low",
|
|
57
|
+
triage: "argon_low",
|
|
58
|
+
translator: "argon_low",
|
|
59
|
+
formatter: "argon_low",
|
|
60
|
+
explore: "argon_low",
|
|
60
61
|
});
|
|
61
|
-
const GEMINI_DEFAULT_PURPOSE_PROFILE = "
|
|
62
|
+
const GEMINI_DEFAULT_PURPOSE_PROFILE = "argon";
|
|
62
63
|
|
|
63
64
|
function resolveGeminiProfileForPurpose(name) {
|
|
64
65
|
const key = String(name ?? "")
|
|
@@ -96,7 +97,8 @@ function resolveGeminiModel(profileOrModel, opts = {}) {
|
|
|
96
97
|
cfg?.modelProfiles,
|
|
97
98
|
cfg?.models,
|
|
98
99
|
]) {
|
|
99
|
-
|
|
100
|
+
// 옛 Flash 이름은 정규화한 이름으로만 찾는다. 원래 이름으로 찾으면 남은 Flash 항목이 돌아온다.
|
|
101
|
+
const entry = bucket?.[name];
|
|
100
102
|
const value = modelValue(entry);
|
|
101
103
|
if (typeof value === "string" && value.trim()) return value.trim();
|
|
102
104
|
}
|
|
@@ -152,8 +154,11 @@ function ensureGeminiProfiles(opts = {}) {
|
|
|
152
154
|
if (!cfg.profiles[name]) added++;
|
|
153
155
|
cfg.profiles[name] = { model };
|
|
154
156
|
}
|
|
155
|
-
if (
|
|
156
|
-
cfg.model
|
|
157
|
+
if (
|
|
158
|
+
!cfg.model ||
|
|
159
|
+
/^Gemini \d+(?:\.\d+)* (?:Flash|Argon) \(/.test(cfg.model)
|
|
160
|
+
)
|
|
161
|
+
cfg.model = profiles.argon.model;
|
|
157
162
|
const changed = writeModelFile(
|
|
158
163
|
profilesPath,
|
|
159
164
|
`${JSON.stringify(cfg, null, 2)}\n`,
|
|
@@ -19,26 +19,26 @@ export const CODEX_FAMILY_PROFILES = Object.freeze({
|
|
|
19
19
|
luna_high: { family: "luna", effort: "high", model: "gpt-6-luna" },
|
|
20
20
|
luna_low: { family: "luna", effort: "low", model: "gpt-6-luna" },
|
|
21
21
|
});
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
family: "
|
|
22
|
+
export const AGY_FAMILY_PROFILES = Object.freeze({
|
|
23
|
+
argon_low: {
|
|
24
|
+
family: "argon",
|
|
25
25
|
effort: "low",
|
|
26
|
-
model: "Gemini
|
|
26
|
+
model: "Gemini 4 Argon (Low)",
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
family: "
|
|
28
|
+
argon: {
|
|
29
|
+
family: "argon",
|
|
30
30
|
effort: "medium",
|
|
31
|
-
model: "Gemini
|
|
31
|
+
model: "Gemini 4 Argon (Medium)",
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
family: "
|
|
33
|
+
argon_high: {
|
|
34
|
+
family: "argon",
|
|
35
35
|
effort: "high",
|
|
36
|
-
model: "Gemini
|
|
36
|
+
model: "Gemini 4 Argon (High)",
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
const DAY_MS = 86_400_000;
|
|
40
40
|
const CODEX_SLUG = /^gpt-(\d+(?:\.\d+)*)-(sol|astra|luna)$/;
|
|
41
|
-
const
|
|
41
|
+
const AGY_SLUG = /^gemini-(\d+(?:\.\d+)*)-(argon)-(low|medium|high)$/;
|
|
42
42
|
|
|
43
43
|
function compareVersions(a, b) {
|
|
44
44
|
const left = a.split(".").map(Number);
|
|
@@ -75,22 +75,25 @@ export function parseAgyModels(output) {
|
|
|
75
75
|
.split(/\r?\n/)
|
|
76
76
|
.flatMap((line) => {
|
|
77
77
|
const [slug, model] = line.trim().split("\t");
|
|
78
|
-
return
|
|
78
|
+
return AGY_SLUG.test(slug) && model?.trim()
|
|
79
79
|
? [{ slug, model: model.trim() }]
|
|
80
80
|
: [];
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export function
|
|
84
|
+
export function selectAgyModel(models, family, effort) {
|
|
85
85
|
return (
|
|
86
86
|
(models || [])
|
|
87
|
-
.filter(
|
|
88
|
-
(item)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
.filter((item) => {
|
|
88
|
+
const match = AGY_SLUG.exec(item?.slug);
|
|
89
|
+
return (
|
|
90
|
+
match?.[2] === family &&
|
|
91
|
+
match?.[3] === effort &&
|
|
92
|
+
typeof item.model === "string"
|
|
93
|
+
);
|
|
94
|
+
})
|
|
92
95
|
.sort((a, b) =>
|
|
93
|
-
compareVersions(
|
|
96
|
+
compareVersions(AGY_SLUG.exec(b.slug)[1], AGY_SLUG.exec(a.slug)[1]),
|
|
94
97
|
)[0] || null
|
|
95
98
|
);
|
|
96
99
|
}
|
|
@@ -174,7 +177,7 @@ export function readCodexModelCatalog(opts = {}) {
|
|
|
174
177
|
export function resolveModelFamilies(provider, opts = {}) {
|
|
175
178
|
const paths = modelFamilyPaths(opts);
|
|
176
179
|
const definitions =
|
|
177
|
-
provider === "codex" ? CODEX_FAMILY_PROFILES :
|
|
180
|
+
provider === "codex" ? CODEX_FAMILY_PROFILES : AGY_FAMILY_PROFILES;
|
|
178
181
|
const recordPath = join(paths.stateDir, `${provider}-model-resolution.json`);
|
|
179
182
|
const previous = readJson(recordPath) || {};
|
|
180
183
|
const now = (opts.now || Date.now)();
|
|
@@ -276,7 +279,7 @@ export function resolveModelFamilies(provider, opts = {}) {
|
|
|
276
279
|
definition.family,
|
|
277
280
|
definition.effort,
|
|
278
281
|
)
|
|
279
|
-
:
|
|
282
|
+
: selectAgyModel(catalog?.models, definition.family, definition.effort);
|
|
280
283
|
profiles[name] =
|
|
281
284
|
candidate &&
|
|
282
285
|
(!last?.fetched_at ||
|
|
@@ -294,6 +297,10 @@ export function resolveModelFamilies(provider, opts = {}) {
|
|
|
294
297
|
};
|
|
295
298
|
selectedProfiles[name] = { ...profiles[name] };
|
|
296
299
|
const pin = pins[definition.family];
|
|
300
|
+
const agyPin =
|
|
301
|
+
provider === "agy" && typeof pin === "string"
|
|
302
|
+
? AGY_SLUG.exec(`${pin}-${definition.effort}`)
|
|
303
|
+
: null;
|
|
297
304
|
if (
|
|
298
305
|
typeof pin === "string" &&
|
|
299
306
|
provider === "codex" &&
|
|
@@ -305,19 +312,17 @@ export function resolveModelFamilies(provider, opts = {}) {
|
|
|
305
312
|
source: paths.pinsPath,
|
|
306
313
|
fetched_at: null,
|
|
307
314
|
};
|
|
308
|
-
} else if (
|
|
309
|
-
typeof pin === "string" &&
|
|
310
|
-
provider === "agy" &&
|
|
311
|
-
/^gemini-\d+(?:\.\d+)*-flash$/.test(pin)
|
|
312
|
-
) {
|
|
315
|
+
} else if (agyPin?.[2] === definition.family) {
|
|
313
316
|
const slug = `${pin}-${definition.effort}`;
|
|
314
|
-
const version =
|
|
317
|
+
const version = agyPin[1];
|
|
318
|
+
const family =
|
|
319
|
+
definition.family[0].toUpperCase() + definition.family.slice(1);
|
|
315
320
|
const effort =
|
|
316
321
|
definition.effort[0].toUpperCase() + definition.effort.slice(1);
|
|
317
322
|
selectedProfiles[name] = {
|
|
318
323
|
model:
|
|
319
324
|
catalog?.models?.find((item) => item.slug === slug)?.model ||
|
|
320
|
-
`Gemini ${version}
|
|
325
|
+
`Gemini ${version} ${family} (${effort})`,
|
|
321
326
|
effort: definition.effort,
|
|
322
327
|
source: paths.pinsPath,
|
|
323
328
|
fetched_at: null,
|