feat(schedule): add durable after reminders
This commit is contained in:
@@ -33,14 +33,12 @@ export type ToolEventView =
|
||||
| { for: 'result'; view: ToolResultView }
|
||||
|
||||
/**
|
||||
* Host-computed presentation for one non-surface Session event. The domain
|
||||
* owns the presentation key and JSON-compatible view shape; the carrier keeps
|
||||
* both generic so an opt-in client plugin can render the event without adding
|
||||
* domain vocabulary to the connection package.
|
||||
* Host-computed presentation for one non-surface Session event. The durable
|
||||
* event type selects an optional client renderer; the sidecar carries only the
|
||||
* JSON-compatible view so the connection package adds no domain vocabulary.
|
||||
*/
|
||||
export interface PresentedEventView {
|
||||
for: 'event'
|
||||
presentationKey: string
|
||||
view: unknown
|
||||
}
|
||||
|
||||
|
||||
@@ -193,10 +193,9 @@ export const toolEventViewSchema = z.discriminatedUnion('for', [
|
||||
z.object({ for: z.literal('result'), view: z.looseObject({ card: z.string() }) }),
|
||||
]) as unknown as z.ZodType<ToolEventView>
|
||||
|
||||
/** Domain-owned presented-event sidecar with a carrier-validated key and present payload. */
|
||||
/** Domain-owned presented-event sidecar whose durable event supplies the renderer key. */
|
||||
const presentedEventViewSchema = z.object({
|
||||
for: z.literal('event'),
|
||||
presentationKey: z.string().min(1),
|
||||
view: z.unknown(),
|
||||
}).refine(value => Object.hasOwn(value, 'view'), {
|
||||
message: 'presented event view payload is required',
|
||||
|
||||
Reference in New Issue
Block a user