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
53 lines
1.0 KiB
TypeScript
53 lines
1.0 KiB
TypeScript
export const AGENT_PROVIDERS = [
|
|
"claude-code",
|
|
"codex",
|
|
"cursor",
|
|
"tutti-agent",
|
|
"nexight",
|
|
"opencode",
|
|
"openclaw"
|
|
] as const;
|
|
export const EXPERIMENTAL_AGENT_PROVIDERS = [] as const;
|
|
|
|
export type AgentProvider = (typeof AGENT_PROVIDERS)[number];
|
|
|
|
export function isValidProvider(value: unknown): value is AgentProvider {
|
|
return (
|
|
typeof value === "string" &&
|
|
AGENT_PROVIDERS.includes(value as AgentProvider)
|
|
);
|
|
}
|
|
|
|
export function normalizeAgentProviderOrder(value: unknown): AgentProvider[] {
|
|
if (!Array.isArray(value)) {
|
|
return [...AGENT_PROVIDERS];
|
|
}
|
|
|
|
const normalized: AgentProvider[] = [];
|
|
const seen = new Set<AgentProvider>();
|
|
|
|
for (const item of value) {
|
|
if (!isValidProvider(item)) {
|
|
continue;
|
|
}
|
|
|
|
if (seen.has(item)) {
|
|
continue;
|
|
}
|
|
|
|
seen.add(item);
|
|
normalized.push(item);
|
|
}
|
|
|
|
for (const provider of AGENT_PROVIDERS) {
|
|
if (seen.has(provider)) {
|
|
continue;
|
|
}
|
|
|
|
seen.add(provider);
|
|
normalized.push(provider);
|
|
}
|
|
|
|
return normalized;
|
|
}
|