import * as S from "effect/Schema"; import { defineAspect, type Aspect } from "./Aspect.ts"; export type AgentId = string; export const AgentId = S.String.annotate({ description: "The ID of the agent", }); export interface Agent< ID extends string = string, References extends any[] = any[], > extends Aspect {} export const Agent = defineAspect< ( name: Name, ) => ( template: TemplateStringsArray, ...references: References ) => Agent >("agent"); export const agentContext = Agent.plugin.context.succeed({ context: (agent) => `@${agent.id}`, });