Skip to main content

@svatah/yam-contract

The surface operation catalogue and the contract fingerprint every client agrees on

Exports

ExportKindSignature
actInputSchemavariableactInputSchema = z.object(
actOutputSchemavariableactOutputSchema = resultEnvelopeSchema.extend(
capabilitiesInputSchemavariablecapabilitiesInputSchema = z.object(
capabilitiesOutputSchemavariablecapabilitiesOutputSchema = resultEnvelopeSchema.extend(
catalogueFingerprintfunctionexport function catalogueFingerprint(): stringA fingerprint of the contract this build serves (T18, SF-03).
checkInputSchemavariablecheckInputSchema = z.object(
checkOutputSchemavariablecheckOutputSchema = resultEnvelopeSchema.extend(
CLI_EXIT_CODESvariableCLI_EXIT_CODES
CliFlaginterfaceexport interface CliFlag
closeInputSchemavariablecloseInputSchema = z.object(
closeOutputSchemavariablecloseOutputSchema = resultEnvelopeSchema.extend(
connectInputSchemavariableconnectInputSchema = zWhat connect may be pointed at (SF-04, T18).
connectOutputSchemavariableconnectOutputSchema = resultEnvelopeSchema.extend(
controlInputSchemavariablecontrolInputSchema = z.object(Take, release, or ask who holds a target (SF-13, T16).
controlOutputSchemavariablecontrolOutputSchema = resultEnvelopeSchema.extend(
describeInputSchemavariabledescribeInputSchema = z.object(
describeOutputSchemavariabledescribeOutputSchema = resultEnvelopeSchema.extend(
ERROR_CODESvariableERROR_CODES = [
ErrorCodetypealiasexport type ErrorCode = (typeof ERROR_CODES)[number];
eventsInputSchemavariableeventsInputSchema = z.object(What a session did (T17, SF-19, SF-21).
eventsOutputSchemavariableeventsOutputSchema = resultEnvelopeSchema.extend(
operationByCliSubcommandfunctionexport function operationByCliSubcommand(sub: string): OperationDescriptor | undefined
operationByMcpToolfunctionexport function operationByMcpTool(toolName: string): OperationDescriptor | undefined
operationByNamefunctionexport function operationByName(name: string): OperationDescriptor | undefined
operationByServicePathfunctionexport function operationByServicePath(method: string, path: string): OperationDescriptor | undefined
OperationDescriptorinterfaceexport interface OperationDescriptor
OPERATIONSvariableOPERATIONS: readonly OperationDescriptor[] = [
readInputSchemavariablereadInputSchema = z.object(
readOutputSchemavariablereadOutputSchema = resultEnvelopeSchema.extend(
requestInputSchemavariablerequestInputSchema = z.object(An HTTP request, on a surface that is one (T15, SF-04).
requestOutputSchemavariablerequestOutputSchema = resultEnvelopeSchema.extend(
ResultEnvelopetypealiasexport type ResultEnvelope = z.infer<typeof resultEnvelopeSchema>;
resultEnvelopeSchemavariableresultEnvelopeSchema = z.object(
screenshotInputSchemavariablescreenshotInputSchema = z.object(
screenshotOutputSchemavariablescreenshotOutputSchema = resultEnvelopeSchema.extend(
sessionsInputSchemavariablesessionsInputSchema = z.object({})
sessionsOutputSchemavariablesessionsOutputSchema = resultEnvelopeSchema.extend(
snapshotInputSchemavariablesnapshotInputSchema = z.object(
snapshotOutputSchemavariablesnapshotOutputSchema = resultEnvelopeSchema.extend(
SURFACE_CLI_SUBCOMMANDSvariableSURFACE_CLI_SUBCOMMANDS = OPERATIONS.map((op) => op.cli.subcommand)
SURFACE_TOOL_NAMESvariableSURFACE_TOOL_NAMES = OPERATIONS.map((op) => op.mcp.toolName)
targetsInputSchemavariabletargetsInputSchema = z.object(
targetsOutputSchemavariabletargetsOutputSchema = resultEnvelopeSchema.extend(