feat(frontend): support des providers OpenCode cloud (#92)
Ajoute l'UI de configuration des providers OpenCode cloud dans le wizard first-run (sélection, édition, sauvegarde, suppression), le domaine et les ports associés, ainsi que les adapters HTTP/mock correspondants. Build + 952 tests verts, comportements clés vérifiés en exécution réelle, y compris un test de couverture ajouté pour le parcours d'édition. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -35,6 +35,7 @@ import type {
|
||||
MemoryType,
|
||||
McpToolPolicy,
|
||||
OpenCodeConfig,
|
||||
OpenCodeProviderCatalogEntry,
|
||||
EffectivePermissions,
|
||||
PairedDevice,
|
||||
PairingCode,
|
||||
@ -671,6 +672,21 @@ export interface ProfileGateway {
|
||||
cloneOpenCodeProfileFromSeed(
|
||||
input?: CloneOpenCodeProfileFromSeedInput,
|
||||
): Promise<AgentProfile>;
|
||||
/**
|
||||
* Static catalogue of OpenCode cloud providers (ticket #92), for the
|
||||
* provider/model pickers of the Cloud sub-form.
|
||||
*/
|
||||
listOpenCodeProviders(): Promise<OpenCodeProviderCatalogEntry[]>;
|
||||
/**
|
||||
* Creates or replaces (by id) an OpenCode profile in **cloud** mode (ticket
|
||||
* #92). Unlike {@link saveProfile}, this takes the literal API key: the
|
||||
* backend seals it into the `SecretStore` and never returns it — the
|
||||
* returned profile's `opencodeProvider` only ever carries `providerId` +
|
||||
* `model` (+ the opaque `apiKeyRef`), never the literal key.
|
||||
*/
|
||||
saveOpenCodeProviderProfile(
|
||||
input: SaveOpenCodeProviderProfileInput,
|
||||
): Promise<AgentProfile>;
|
||||
}
|
||||
|
||||
/** Input for {@link ProfileGateway.cloneOpenCodeProfileFromSeed}. */
|
||||
@ -681,6 +697,18 @@ export interface CloneOpenCodeProfileFromSeedInput {
|
||||
opencode?: OpenCodeConfig;
|
||||
}
|
||||
|
||||
/** Input for {@link ProfileGateway.saveOpenCodeProviderProfile}. */
|
||||
export interface SaveOpenCodeProviderProfileInput {
|
||||
/** The profile to create or replace (by id). */
|
||||
profile: AgentProfile;
|
||||
/** Provider id in the OpenCode registry (e.g. `"anthropic"`). */
|
||||
providerId: string;
|
||||
/** Model name served by this provider. */
|
||||
model: string;
|
||||
/** Literal API key — sealed into the `SecretStore`, never persisted as-is. */
|
||||
apiKey: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Local model servers (F35). CRUD over the global registry of declared
|
||||
* `llama.cpp` servers an OpenCode profile can bind to via
|
||||
|
||||
Reference in New Issue
Block a user