@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?
optionalHORN_STUDIO?:DurableObjectNamespace<HornStudioAgent>
The Durable Object a host binds HornStudioAgent to. Absent until a host adds it.
StudioDeps
StudioDeps =
object
Properties
componentApi?
optionalcomponentApi?:ComponentApiLookup
shapes
shapes: (
realm) => readonlyShape[]
The realm’s SHACL shapes, which is what a turn reads classes from.
Parameters
realm
Realm
Returns
readonly Shape[]
typecheck?
optionaltypecheck?: (source) => readonlyTypeProblem[]
Parameters
source
string
Returns
readonly TypeProblem[]
Variables
studioUnboundMessage
conststudioUnboundMessage:"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
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, "/">