import { Clearable } from '../shared/clearable' ; import { PinLike } from '../pin/pin-like' ; import { PinMap } from '../pin/pin-map' ; import { isSignature , Signature } from './signature' ; /**
 *
 * Denotes objects that can behave like an [agent](https://connective.dev/docs/agent).
 *
 */ export interface AgentLike extends Clearable { param label returns throws in ( label ) : PinLike ; param label returns throws out ( label ) : PinLike ; /**
     *
     * A `PinMap` object referencing all of input pins of the agent.
     *
     */ inputs : PinMap ; /**
     *
     * A `PinMap` object referencing all of output pins of the agent.
     *
     */ outputs : PinMap ; /**
     *
     * The [signature](https://connective.dev/docs/agent#signature) of the agent.
     *
     */ signature : Signature ; } param whatever returns export function isAgentLike ( whatever ) { return whatever !== undefined && ( typeof whatever . in == 'function' ) && ( typeof whatever . out == 'function' ) && whatever . inputs instanceof PinMap && whatever . outputs instanceof PinMap && whatever . signature !== undefined && isSignature ( whatever . signature ) ; }