refactor: unwrap Agent namespace + self-reexport (#22935)

This commit is contained in:
Kit Langton
2026-04-17 00:01:44 +00:00
committed by GitHub
parent 79732ab175
commit fb02744460
+4 -4
View File
@@ -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"