feat(sessions): label lookup tightening (#570) (thanks @azade-c)

This commit is contained in:
Peter Steinberger
2026-01-09 16:39:59 +01:00
parent 09b602b4ec
commit 7d518e336e
8 changed files with 343 additions and 598 deletions

View File

@@ -1,6 +1,7 @@
import { type Static, type TSchema, Type } from "@sinclair/typebox";
const NonEmptyString = Type.String({ minLength: 1 });
const SessionLabelString = Type.String({ minLength: 1, maxLength: 64 });
export const PresenceEntrySchema = Type.Object(
{
@@ -225,7 +226,7 @@ export const AgentParamsSchema = Type.Object(
lane: Type.Optional(Type.String()),
extraSystemPrompt: Type.Optional(Type.String()),
idempotencyKey: NonEmptyString,
label: Type.Optional(Type.String()),
label: Type.Optional(SessionLabelString),
spawnedBy: Type.Optional(Type.String()),
},
{ additionalProperties: false },
@@ -315,6 +316,7 @@ export const SessionsListParamsSchema = Type.Object(
activeMinutes: Type.Optional(Type.Integer({ minimum: 1 })),
includeGlobal: Type.Optional(Type.Boolean()),
includeUnknown: Type.Optional(Type.Boolean()),
label: Type.Optional(SessionLabelString),
spawnedBy: Type.Optional(NonEmptyString),
agentId: Type.Optional(NonEmptyString),
},
@@ -324,7 +326,7 @@ export const SessionsListParamsSchema = Type.Object(
export const SessionsPatchParamsSchema = Type.Object(
{
key: NonEmptyString,
label: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
label: Type.Optional(Type.Union([SessionLabelString, Type.Null()])),
thinkingLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
verboseLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
reasoningLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),