Skip to content
中文

RegisteredProtocol ​

KIT · interface · Type contract

Runtime extension contract; hosts retain their own version values and validation context.

Import ​

ts
import type { RegisteredProtocol } from '@jangts/agent-core/kits/interaction';
js
/** @typedef {import('@jangts/agent-core/kits/interaction').RegisteredProtocol} RegisteredProtocol */

Other public entry points:@jangts/agent-core, @jangts/agent-core/types, @jangts/agent-core/structs, @jangts/agent-core/kits/interaction, @jangts/agent-core/kits.

Definition ​

ts
interface RegisteredProtocol<Args>

Extends or implements: ProtocolShape.

Type parameters ​

Type parameterConstraintDefault type
Argsunknown[][]

Field structure ​

FieldTypeRequiredDescription
versionnumber | undefinedOptionalRead-only. See the type definition and usage context.
descriptionstring | undefinedOptionalRead-only. See the type definition and usage context.
terminalboolean | undefinedOptionalRead-only. See the type definition and usage context.
assert((value: Record<string, unknown>, ...args: Args) => void) | undefinedOptionalStructural validation for an already resolved command value.
modelJsonSchemaRecord<string, unknown> | undefinedOptionalRead-only. Optional schema for model output.
inputJsonSchemaRecord<string, unknown> | undefinedOptionalRead-only. Optional schema for runtime input.
fieldSchemasRecord<string, unknown> | undefinedOptionalRead-only. Optional per-field schemas.
keys(value: Record<string, unknown>) => string[]RequiredSelector values carried by value.

Member index ​

MemberPurpose
keysSelector values carried by value.

Member details ​

keys ​

Selector values carried by value.

ts
RegisteredProtocol.keys(value: Record<string, unknown>): string[]

Selector values carried by value.

ParameterTypePassingDescription
valueRecord<string, unknown>Required—

Returns: string[].

Using the type ​

When using this type, choose type arguments from the table above; parameters with defaults may be omitted.

API reference, usage examples and developer guides.