feat: extend Control UI assistant identity
This commit is contained in:
@@ -2,6 +2,10 @@ import AjvPkg, { type ErrorObject } from "ajv";
|
||||
import {
|
||||
type AgentEvent,
|
||||
AgentEventSchema,
|
||||
type AgentIdentityParams,
|
||||
AgentIdentityParamsSchema,
|
||||
type AgentIdentityResult,
|
||||
AgentIdentityResultSchema,
|
||||
AgentParamsSchema,
|
||||
type AgentSummary,
|
||||
AgentSummarySchema,
|
||||
@@ -198,6 +202,8 @@ export const validateEventFrame = ajv.compile<EventFrame>(EventFrameSchema);
|
||||
export const validateSendParams = ajv.compile(SendParamsSchema);
|
||||
export const validatePollParams = ajv.compile<PollParams>(PollParamsSchema);
|
||||
export const validateAgentParams = ajv.compile(AgentParamsSchema);
|
||||
export const validateAgentIdentityParams =
|
||||
ajv.compile<AgentIdentityParams>(AgentIdentityParamsSchema);
|
||||
export const validateAgentWaitParams = ajv.compile<AgentWaitParams>(AgentWaitParamsSchema);
|
||||
export const validateWakeParams = ajv.compile<WakeParams>(WakeParamsSchema);
|
||||
export const validateAgentsListParams = ajv.compile<AgentsListParams>(AgentsListParamsSchema);
|
||||
@@ -359,6 +365,8 @@ export {
|
||||
SendParamsSchema,
|
||||
PollParamsSchema,
|
||||
AgentParamsSchema,
|
||||
AgentIdentityParamsSchema,
|
||||
AgentIdentityResultSchema,
|
||||
WakeParamsSchema,
|
||||
NodePairRequestParamsSchema,
|
||||
NodePairListParamsSchema,
|
||||
@@ -432,6 +440,8 @@ export type {
|
||||
ErrorShape,
|
||||
StateVersion,
|
||||
AgentEvent,
|
||||
AgentIdentityParams,
|
||||
AgentIdentityResult,
|
||||
AgentWaitParams,
|
||||
ChatEvent,
|
||||
TickEvent,
|
||||
|
||||
@@ -68,6 +68,23 @@ export const AgentParamsSchema = Type.Object(
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const AgentIdentityParamsSchema = Type.Object(
|
||||
{
|
||||
agentId: Type.Optional(NonEmptyString),
|
||||
sessionKey: Type.Optional(Type.String()),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const AgentIdentityResultSchema = Type.Object(
|
||||
{
|
||||
agentId: NonEmptyString,
|
||||
name: Type.Optional(NonEmptyString),
|
||||
avatar: Type.Optional(NonEmptyString),
|
||||
},
|
||||
{ additionalProperties: false },
|
||||
);
|
||||
|
||||
export const AgentWaitParamsSchema = Type.Object(
|
||||
{
|
||||
runId: NonEmptyString,
|
||||
|
||||
@@ -2,6 +2,8 @@ import type { TSchema } from "@sinclair/typebox";
|
||||
|
||||
import {
|
||||
AgentEventSchema,
|
||||
AgentIdentityParamsSchema,
|
||||
AgentIdentityResultSchema,
|
||||
AgentParamsSchema,
|
||||
AgentWaitParamsSchema,
|
||||
PollParamsSchema,
|
||||
@@ -136,6 +138,8 @@ export const ProtocolSchemas: Record<string, TSchema> = {
|
||||
SendParams: SendParamsSchema,
|
||||
PollParams: PollParamsSchema,
|
||||
AgentParams: AgentParamsSchema,
|
||||
AgentIdentityParams: AgentIdentityParamsSchema,
|
||||
AgentIdentityResult: AgentIdentityResultSchema,
|
||||
AgentWaitParams: AgentWaitParamsSchema,
|
||||
WakeParams: WakeParamsSchema,
|
||||
NodePairRequestParams: NodePairRequestParamsSchema,
|
||||
|
||||
@@ -2,6 +2,8 @@ import type { Static } from "@sinclair/typebox";
|
||||
|
||||
import type {
|
||||
AgentEventSchema,
|
||||
AgentIdentityParamsSchema,
|
||||
AgentIdentityResultSchema,
|
||||
AgentWaitParamsSchema,
|
||||
PollParamsSchema,
|
||||
WakeParamsSchema,
|
||||
@@ -125,6 +127,8 @@ export type PresenceEntry = Static<typeof PresenceEntrySchema>;
|
||||
export type ErrorShape = Static<typeof ErrorShapeSchema>;
|
||||
export type StateVersion = Static<typeof StateVersionSchema>;
|
||||
export type AgentEvent = Static<typeof AgentEventSchema>;
|
||||
export type AgentIdentityParams = Static<typeof AgentIdentityParamsSchema>;
|
||||
export type AgentIdentityResult = Static<typeof AgentIdentityResultSchema>;
|
||||
export type PollParams = Static<typeof PollParamsSchema>;
|
||||
export type AgentWaitParams = Static<typeof AgentWaitParamsSchema>;
|
||||
export type WakeParams = Static<typeof WakeParamsSchema>;
|
||||
|
||||
Reference in New Issue
Block a user