feat: unify poll support

Co-authored-by: DBH <5251425+dbhurley@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-06 04:43:35 +00:00
parent 1f4d9e83ff
commit 0b27964693
19 changed files with 360 additions and 118 deletions

View File

@@ -68,6 +68,8 @@ import {
NodePairVerifyParamsSchema,
type NodeRenameParams,
NodeRenameParamsSchema,
type PollParams,
PollParamsSchema,
PROTOCOL_VERSION,
type PresenceEntry,
PresenceEntrySchema,
@@ -349,6 +351,7 @@ export type {
ErrorShape,
StateVersion,
AgentEvent,
PollParams,
AgentWaitParams,
ChatEvent,
TickEvent,

View File

@@ -203,12 +203,13 @@ export const PollParamsSchema = Type.Object(
to: NonEmptyString,
question: NonEmptyString,
options: Type.Array(NonEmptyString, { minItems: 2, maxItems: 12 }),
selectableCount: Type.Optional(Type.Integer({ minimum: 1, maximum: 12 })),
maxSelections: Type.Optional(Type.Integer({ minimum: 1, maximum: 12 })),
durationHours: Type.Optional(Type.Integer({ minimum: 1 })),
provider: Type.Optional(Type.String()),
idempotencyKey: NonEmptyString,
},
{ additionalProperties: false },
);
export const AgentParamsSchema = Type.Object(
{
message: NonEmptyString,