refactor: unwrap Agent namespace + self-reexport (#22935)
This commit is contained in:
@@ -24,7 +24,6 @@ import { InstanceState } from "@/effect"
|
|||||||
import * as Option from "effect/Option"
|
import * as Option from "effect/Option"
|
||||||
import * as OtelTracer from "@effect/opentelemetry/Tracer"
|
import * as OtelTracer from "@effect/opentelemetry/Tracer"
|
||||||
|
|
||||||
export namespace Agent {
|
|
||||||
export const Info = z
|
export const Info = z
|
||||||
.object({
|
.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
@@ -53,8 +52,8 @@ export namespace Agent {
|
|||||||
export type Info = z.infer<typeof Info>
|
export type Info = z.infer<typeof Info>
|
||||||
|
|
||||||
export interface Interface {
|
export interface Interface {
|
||||||
readonly get: (agent: string) => Effect.Effect<Agent.Info>
|
readonly get: (agent: string) => Effect.Effect<Info>
|
||||||
readonly list: () => Effect.Effect<Agent.Info[]>
|
readonly list: () => Effect.Effect<Info[]>
|
||||||
readonly defaultAgent: () => Effect.Effect<string>
|
readonly defaultAgent: () => Effect.Effect<string>
|
||||||
readonly generate: (input: {
|
readonly generate: (input: {
|
||||||
description: string
|
description: string
|
||||||
@@ -409,4 +408,5 @@ export namespace Agent {
|
|||||||
Layer.provide(Config.defaultLayer),
|
Layer.provide(Config.defaultLayer),
|
||||||
Layer.provide(Skill.defaultLayer),
|
Layer.provide(Skill.defaultLayer),
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
export * as Agent from "./agent"
|
||||||
|
|||||||
Reference in New Issue
Block a user