|
|
@@ -4,7 +4,10 @@ import { Schema, SchemaGetter } from "effect"
|
|
|
import { PositiveInt } from "../../schema"
|
|
|
import { ConfigPermissionV1 } from "./permission"
|
|
|
|
|
|
-const Color = Schema.String.check(Schema.isPattern(/^#[0-9a-fA-F]{6}$/))
|
|
|
+const Color = Schema.Union([
|
|
|
+ Schema.String.check(Schema.isPattern(/^#[0-9a-fA-F]{6}$/)),
|
|
|
+ Schema.Literals(["primary", "secondary", "accent", "success", "warning", "error", "info"]),
|
|
|
+])
|
|
|
|
|
|
const AgentSchema = Schema.StructWithRest(
|
|
|
Schema.Struct({
|
|
|
@@ -26,7 +29,7 @@ const AgentSchema = Schema.StructWithRest(
|
|
|
}),
|
|
|
options: Schema.optional(Schema.Record(Schema.String, Schema.Any)),
|
|
|
color: Schema.optional(Color).annotate({
|
|
|
- description: "Hex color code (e.g., #FF5733)",
|
|
|
+ description: "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
|
|
|
}),
|
|
|
steps: Schema.optional(PositiveInt).annotate({
|
|
|
description: "Maximum number of agentic iterations before forcing text-only response",
|