@gik-ai/agentface
v0.1.2
Published
Agent-facing projection surface over the shared face catalog for the Generative Interaction Kernel.
Maintainers
Readme
@gik-ai/agentface
Agent-facing projection surface for the Generative Interaction Kernel — an allowlisted, agent-safe
projection over the shared face tool catalog. agentface is not a second engine; it applies the
agent-safe filter to that shared catalog and exposes authoring plus read-oriented tools (getState / getTree).
npm install @gik-ai/agentfaceimport { createAgentFaceDispatcher, createStatelessAgentFaceDispatcher } from "@gik-ai/agentface";
// Live, bounded surface over a running ControlFace:
const dispatch = createAgentFaceDispatcher(controlFace);
// Authoring/validation tools only, no runtime attached:
const authoringOnly = createStatelessAgentFaceDispatcher();Mount the returned dispatcher over a transport selected by the host.
Exported API
@gik-ai/agentface exports the following public surface from packages/agentface/src/index.ts.
The live helpers are declared with face: RuntimeFace; that type comes from
@gik-ai/controlface and is not re-exported from this package.
Functions
agentFaceProjection(face): McpTool[]returns the tools from the shared catalog whoseagentSafeflag istrue.createAgentFaceDispatcher(face): McpDispatcherbuilds anMcpDispatcherover that filtered tool list and identifies itself as{ name: "genui-agentface", version: "0.1" }.createStatelessAgentFaceDispatcher(extraTools?: McpTool[]): McpDispatcherbuilds a dispatcher from the built-in pure authoring tools plus any suppliedextraTools, then filters the combined list byagentSafe.
Constants and types
AGENTFACE_ALLOWLISTis aReadonlySet<string>containing the built-in agent-safe tool names:describeCatalog,namespaces,effects,validateDocument,lintDocument,authorProjectedProgram,validateCapability,getState,getTree, anddescribeServiceKinds.MCP_PROTOCOL_VERSIONis"2025-06-18".McpTooldescribes one callable tool withname,description,inputSchema,handler(args), and optionalagentSafe.McpDispatcherexposestools,listTools(),callTool(name, args?), andhandleMcpMessage(message). Its JSON-RPC handler supportsinitialize,tools/list, andtools/call.McpServerInfois the{ name, version }pair used in theinitializeresponse.
Security boundary
agentface exposes an allowlisted projection; it is not a transport-level
security mechanism. The host remains responsible for authentication,
authorization, endpoint policy, and credential handling.
License
MIT
