P3 Slice Zero, Task 4 — replace Web free-text selection with the structured harness catalog (#1170)
ci/woodpecker/push/publish Pipeline failed
ci/woodpecker/push/publish Pipeline failed
Co-authored-by: Jason Woltje <[email protected]>
This commit was merged in pull request #1170.
This commit is contained in:
@@ -1,3 +1,42 @@
|
||||
import type {
|
||||
HarnessAuthState,
|
||||
HarnessModelAvailability,
|
||||
HarnessSelection,
|
||||
} from '@mosaicstack/types';
|
||||
|
||||
// The exact harness/provider/model tuple and its closed enum companions are the
|
||||
// shared domain types — re-exported here so web consumers (and the runtime
|
||||
// guards) import one shape, never a divergent local redefinition.
|
||||
export type { HarnessSelection, HarnessAuthState, HarnessModelAvailability };
|
||||
|
||||
/** Harness summary row from `GET /api/harnesses` (the `HarnessSummaryDto`). The
|
||||
* harness id is kept distinct from any provider id — they are never merged. */
|
||||
export interface HarnessSummary {
|
||||
id: string;
|
||||
displayName: string;
|
||||
capabilities: string[];
|
||||
}
|
||||
|
||||
/** One selectable model in a harness catalog. Extends the `{harnessId,
|
||||
* providerId, modelId}` tuple with the display/availability metadata the UI
|
||||
* needs; `inputTypes` is kept as a plain `string[]` on the client boundary
|
||||
* because it arrives from untrusted JSON and is only ever displayed. */
|
||||
export interface HarnessCatalogEntry extends HarnessSelection {
|
||||
displayName: string;
|
||||
reasoningCapability: boolean;
|
||||
inputTypes: string[];
|
||||
authState: HarnessAuthState;
|
||||
availability: HarnessModelAvailability;
|
||||
}
|
||||
|
||||
/** Harness-scoped catalog from `GET /api/harnesses/:harnessId/catalog`. */
|
||||
export interface HarnessCatalog {
|
||||
harnessId: string;
|
||||
version: string;
|
||||
fingerprint: string;
|
||||
models: HarnessCatalogEntry[];
|
||||
}
|
||||
|
||||
/** Conversation returned by the gateway API. */
|
||||
export interface Conversation {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user