This branch snapshots the in-progress desktop workspace so GitHub-hosted Windows and Linux runners can package the same source tree that already passes local verification on macOS. Constraint: Local Apple Silicon Docker/Wine packaging crashes before Windows artifacts are produced Rejected: Publish from the incomplete base repo state | remote typecheck failed because current source additions were missing Confidence: medium Scope-risk: broad Directive: Treat this branch as a build snapshot only; do not merge it without reviewing the unrelated workspace changes it contains Tested: local typecheck, lint, workspace typecheck, unit tests, integration tests, e2e smoke, macOS signed release upload Not-tested: Native Windows/Linux artifacts before this CI run
354 lines
11 KiB
TypeScript
354 lines
11 KiB
TypeScript
import type { ServerAdapterModule } from "@agentcompany/adapter-utils";
|
|
import { agentConfigurationDoc as claudeDoc, models as claudeModels } from "@agentcompany/adapter-claude-local";
|
|
import { execute as claudeExecute, sessionCodec as claudeSessionCodec, testEnvironment as claudeTestEnvironment } from "@agentcompany/adapter-claude-local/server";
|
|
import {
|
|
agentConfigurationDoc as codexDoc,
|
|
DEFAULT_CODEX_LOCAL_MODEL,
|
|
models as codexModels,
|
|
} from "@agentcompany/adapter-codex-local";
|
|
import { execute as codexExecute, sessionCodec as codexSessionCodec, testEnvironment as codexTestEnvironment } from "@agentcompany/adapter-codex-local/server";
|
|
import { agentConfigurationDoc as geminiDoc, DEFAULT_GEMINI_LOCAL_MODEL, models as geminiModels } from "@agentcompany/adapter-gemini-local";
|
|
import { execute as geminiExecute, sessionCodec as geminiSessionCodec, testEnvironment as geminiTestEnvironment } from "@agentcompany/adapter-gemini-local/server";
|
|
import type { CapabilityMatrix, ConnectorId } from "@shared/types";
|
|
|
|
export interface ConnectorDefinition {
|
|
id: ConnectorId;
|
|
label: string;
|
|
description: string;
|
|
defaultCommand: string;
|
|
defaultModel: string | null;
|
|
notes: string;
|
|
capabilityMatrix: CapabilityMatrix;
|
|
configurationDoc: string;
|
|
module: ServerAdapterModule;
|
|
listModels?: () => Promise<Array<{ id: string; label: string }>>;
|
|
}
|
|
|
|
export const CONNECTORS: ConnectorDefinition[] = [
|
|
{
|
|
id: "codex_local",
|
|
label: "Codex",
|
|
description: "Local Codex CLI with session resume, structured event parsing, and model selection.",
|
|
defaultCommand: "codex",
|
|
defaultModel: DEFAULT_CODEX_LOCAL_MODEL,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: codexDoc,
|
|
module: {
|
|
type: "codex_local",
|
|
execute: codexExecute,
|
|
testEnvironment: codexTestEnvironment,
|
|
sessionCodec: codexSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: codexModels,
|
|
},
|
|
listModels: async () => codexModels,
|
|
},
|
|
{
|
|
id: "claude_local",
|
|
label: "Claude Code",
|
|
description: "Local Claude Code CLI with session persistence and structured result parsing.",
|
|
defaultCommand: "claude",
|
|
defaultModel: claudeModels[0]?.id ?? null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: true,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compatible",
|
|
label: "Claude Code Compatible API",
|
|
description: "Claude Code CLI connected to a third-party API provider (e.g. DeepSeek, OpenRouter, Ollama).",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_2",
|
|
label: "Claude Code Compatible API (2)",
|
|
description: "Second Claude Code CLI compatible API slot for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_3",
|
|
label: "Claude Code Compatible API (3)",
|
|
description: "Third Claude Code CLI compatible API slot for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_4",
|
|
label: "Claude Code Compatible API (4)",
|
|
description: "Claude Code CLI compatible API slot 4 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_5",
|
|
label: "Claude Code Compatible API (5)",
|
|
description: "Claude Code CLI compatible API slot 5 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_6",
|
|
label: "Claude Code Compatible API (6)",
|
|
description: "Claude Code CLI compatible API slot 6 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_7",
|
|
label: "Claude Code Compatible API (7)",
|
|
description: "Claude Code CLI compatible API slot 7 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_8",
|
|
label: "Claude Code Compatible API (8)",
|
|
description: "Claude Code CLI compatible API slot 8 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_9",
|
|
label: "Claude Code Compatible API (9)",
|
|
description: "Claude Code CLI compatible API slot 9 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "claude_compat_10",
|
|
label: "Claude Code Compatible API (10)",
|
|
description: "Claude Code CLI compatible API slot 10 for a third-party provider.",
|
|
defaultCommand: "claude",
|
|
defaultModel: null,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: false,
|
|
},
|
|
configurationDoc: claudeDoc,
|
|
module: {
|
|
type: "claude_local",
|
|
execute: claudeExecute,
|
|
testEnvironment: claudeTestEnvironment,
|
|
sessionCodec: claudeSessionCodec,
|
|
nativeContextManagement: true,
|
|
models: claudeModels,
|
|
},
|
|
listModels: async () => claudeModels,
|
|
},
|
|
{
|
|
id: "gemini_local",
|
|
label: "Gemini CLI",
|
|
description: "Local Gemini CLI with resume support and JSON event parsing.",
|
|
defaultCommand: "gemini",
|
|
defaultModel: DEFAULT_GEMINI_LOCAL_MODEL,
|
|
notes: "",
|
|
capabilityMatrix: {
|
|
sessionResume: true,
|
|
gracefulCancel: true,
|
|
modelDiscovery: false,
|
|
structuredTranscript: true,
|
|
costAttribution: true,
|
|
},
|
|
configurationDoc: geminiDoc,
|
|
module: {
|
|
type: "gemini_local",
|
|
execute: geminiExecute,
|
|
testEnvironment: geminiTestEnvironment,
|
|
sessionCodec: geminiSessionCodec,
|
|
nativeContextManagement: false,
|
|
models: geminiModels,
|
|
},
|
|
listModels: async () => geminiModels,
|
|
},
|
|
];
|