/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/core/src/config/agent.ts
25 строк
1 KB
Kit Langton
refactor(core): remove schema forwarding facades (#33577)
24 июн 2026, 05:52
Не верифицирован
24 июн 2026, 05:52
5789558
Код
Авторство
О чём код?
export * as ConfigAgent from "./agent" import { Schema } from "effect" import { Permission } from "@opencode-ai/schema/permission" import { ConfigProvider } from "./provider" import { PositiveInt } from "../schema" export const Color = Schema.Union([ Schema.String.check(Schema.isPattern(/^#[0-9a-fA-F]{6}$/)), Schema.Literals(["primary", "secondary", "accent", "success", "warning", "error", "info"]), ]) export class Info extends Schema.Class<Info>("ConfigV2.Agent")({ model: Schema.String.pipe(Schema.optional), variant: Schema.String.pipe(Schema.optional), request: ConfigProvider.Request.pipe(Schema.optional), system: Schema.String.pipe(Schema.optional), description: Schema.String.pipe(Schema.optional), mode: Schema.Literals(["subagent", "primary", "all"]).pipe(Schema.optional), hidden: Schema.Boolean.pipe(Schema.optional), color: Color.pipe(Schema.optional), steps: PositiveInt.pipe(Schema.optional), disabled: Schema.Boolean.pipe(Schema.optional), permissions: Permission.Ruleset.pipe(Schema.optional), }) {}