Manta Developers
GitHub
Menu

@manta-eu/horns-server/studio-agent

Reference for @manta-eu/horns-server/studio-agent in @manta-eu/horns-server 0.2.3.

Type Aliases

StudioAgentRoutesEnv

StudioAgentRoutesEnv = StudioAgentEnv & StudioConversationEnv & object

Type Declaration

HORN_STUDIO?

optional HORN_STUDIO?: DurableObjectNamespace<HornStudioAgent>

The Durable Object a host binds HornStudioAgent to. Absent until a host adds it.


StudioDeps

StudioDeps = object

Properties

componentApi?

optional componentApi?: ComponentApiLookup

shapes

shapes: (realm) => readonly Shape[]

The realm’s SHACL shapes, which is what a turn reads classes from.

Parameters
realm

Realm

Returns

readonly Shape[]

typecheck?

optional typecheck?: (source) => readonly TypeProblem[]

Parameters
source

string

Returns

readonly TypeProblem[]

Variables

studioUnboundMessage

const studioUnboundMessage: "This deployment has no Studio: bind HORN_STUDIO to the HornStudioAgent class and add its migration." = "This deployment has no Studio: bind HORN_STUDIO to the HornStudioAgent class and add its migration."

Functions

provideStudioDeps()

provideStudioDeps(deps): void

A Durable Object is built by the runtime, so it takes no constructor arguments: a host registers what the Studio reads at module scope instead, beside where it exports the agent.

Parameters

deps

StudioDeps

Returns

void


studioAgentRoutes()

studioAgentRoutes<Env>(): Hono<{ Bindings: Env; }, any, "/">

The Studio conversation, addressed the way every other Horns route is.

Not routeAgentRequest: its /agents/:binding/:name shape carries no datastore, and the grant is checked before the object is reached rather than inside it.

Type Parameters

Env

Env extends StudioAgentRoutesEnv

Returns

Hono<{ Bindings: Env; }, any, "/">