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 parameter | Constraint | Default type |
|---|---|---|
Args | unknown[] | [] |
Field structure
| Field | Type | Required | Description |
|---|---|---|---|
version | number | undefined | Optional | Read-only. See the type definition and usage context. |
description | string | undefined | Optional | Read-only. See the type definition and usage context. |
terminal | boolean | undefined | Optional | Read-only. See the type definition and usage context. |
assert | ((value: Record<string, unknown>, ...args: Args) => void) | undefined | Optional | Structural validation for an already resolved command value. |
modelJsonSchema | Record<string, unknown> | undefined | Optional | Read-only. Optional schema for model output. |
inputJsonSchema | Record<string, unknown> | undefined | Optional | Read-only. Optional schema for runtime input. |
fieldSchemas | Record<string, unknown> | undefined | Optional | Read-only. Optional per-field schemas. |
keys | (value: Record<string, unknown>) => string[] | Required | Selector values carried by value. |
Member index
| Member | Purpose |
|---|---|
keys | Selector 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.
| Parameter | Type | Passing | Description |
|---|---|---|---|
value | Record<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.