refactor(core): select system prompts through plugins (#37181)
This commit is contained in:
parent
b5177adb5b
commit
720f062cd0
29 changed files with 447 additions and 263 deletions
|
|
@ -12,6 +12,9 @@ export interface AgentDraft {
|
|||
}
|
||||
|
||||
export interface AgentDomain extends AgentApi<unknown> {
|
||||
readonly get: (id: string) => Effect.Effect<AgentGetOutput | undefined>
|
||||
readonly transform: Transform<AgentDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
|
||||
type AgentGetOutput = Effect.Success<ReturnType<AgentApi<unknown>["list"]>>["data"][number]
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@ export interface CatalogDraft {
|
|||
}
|
||||
|
||||
export interface CatalogDomain extends CatalogApi<unknown> {
|
||||
readonly model: CatalogApi<unknown>["model"] & {
|
||||
readonly get: (providerID: string, modelID: string) => Effect.Effect<ModelGetOutput | undefined>
|
||||
}
|
||||
readonly transform: Transform<CatalogDraft>
|
||||
readonly reload: () => Effect.Effect<void>
|
||||
}
|
||||
|
||||
type ModelGetOutput = Effect.Success<ReturnType<CatalogApi<unknown>["model"]["list"]>>["data"][number]
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import type { Transform } from "./registration.js"
|
|||
export type { AgentDraft }
|
||||
|
||||
export interface AgentDomain extends AgentApi {
|
||||
readonly get: (id: string) => Promise<AgentGetOutput | undefined>
|
||||
readonly transform: Transform<AgentDraft>
|
||||
readonly reload: () => Promise<void>
|
||||
}
|
||||
|
||||
type AgentGetOutput = Awaited<ReturnType<AgentApi["list"]>>["data"][number]
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ import type { Transform } from "./registration.js"
|
|||
export type { CatalogDraft, CatalogProviderRecord }
|
||||
|
||||
export interface CatalogDomain extends CatalogApi {
|
||||
readonly model: CatalogApi["model"] & {
|
||||
readonly get: (providerID: string, modelID: string) => Promise<ModelGetOutput | undefined>
|
||||
}
|
||||
readonly transform: Transform<CatalogDraft>
|
||||
readonly reload: () => Promise<void>
|
||||
}
|
||||
|
||||
type ModelGetOutput = Awaited<ReturnType<CatalogApi["model"]["list"]>>["data"][number]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue