Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
export type TuttiPreferenceTier = "cost" | "balance" | "powerful";
|
|
export type TuttiModelPreference = "economical" | "balanced" | "mostCapable";
|
|
export type TuttiVerificationPreference = "focused" | "relevant" | "thorough";
|
|
|
|
export interface TuttiPreferencePreview {
|
|
effect: number;
|
|
speed: number;
|
|
effectTier: TuttiPreferenceTier;
|
|
speedTier: TuttiPreferenceTier;
|
|
modelPreference: TuttiModelPreference;
|
|
verificationPreference: TuttiVerificationPreference;
|
|
parallelTarget: number;
|
|
}
|
|
|
|
function normalizePreference(value: number): number {
|
|
return Number.isFinite(value)
|
|
? Math.min(100, Math.max(0, Math.round(value)))
|
|
: 50;
|
|
}
|
|
|
|
function preferenceTier(value: number): TuttiPreferenceTier {
|
|
return value <= 33 ? "cost" : value <= 66 ? "balance" : "powerful";
|
|
}
|
|
|
|
/**
|
|
* Projects the two continuous Tutti preferences into qualitative guidance.
|
|
*
|
|
* Effect raises the model capability floor and verification breadth, and
|
|
* drives the qualitative model strategy label. Speed sets a 1-4 parallel
|
|
* Agent target. Actual concurrency remains bounded by dependencies, safe
|
|
* isolation, budget, and workspace capacity.
|
|
*/
|
|
export function projectTuttiPreferencePreview(
|
|
effect: number,
|
|
speed: number
|
|
): TuttiPreferencePreview {
|
|
const normalizedEffect = normalizePreference(effect);
|
|
const normalizedSpeed = normalizePreference(speed);
|
|
const effectTier = preferenceTier(normalizedEffect);
|
|
const speedTier = preferenceTier(normalizedSpeed);
|
|
|
|
return {
|
|
effect: normalizedEffect,
|
|
speed: normalizedSpeed,
|
|
effectTier,
|
|
speedTier,
|
|
modelPreference:
|
|
effectTier === "powerful"
|
|
? "mostCapable"
|
|
: effectTier === "cost"
|
|
? "economical"
|
|
: "balanced",
|
|
verificationPreference:
|
|
effectTier === "powerful"
|
|
? "thorough"
|
|
: effectTier === "cost"
|
|
? "focused"
|
|
: "relevant",
|
|
parallelTarget: Math.min(4, Math.floor(normalizedSpeed / 25) + 1)
|
|
};
|
|
}
|