Context
CallbackSchema from @loopstack/common is the base zod schema for every sub-workflow callback payload — it carries workflowId, status, and data: unknown. The HITL docs show callbacks being typed with an undefined AnswerCallback schema but never explain that it should extend CallbackSchema. As a result, readers don't know payload.workflowId and payload.status exist at top-level (which is needed to update the corresponding LinkDocument on callback).
What to do
Document CallbackSchema and the canonical extension pattern, and mirror it into every HITL feature/example doc.
Affected area
- Docs:
build/patterns/human-in-the-loop.md, registry/features/hitl-module.md, every HITL example doc
Acceptance criteria
Additional context
Surfaced during a benchmark agent session. See todo-docs.md#5.
Context
CallbackSchemafrom@loopstack/commonis the base zod schema for every sub-workflow callback payload — it carriesworkflowId,status, anddata: unknown. The HITL docs show callbacks being typed with an undefinedAnswerCallbackschema but never explain that it should extendCallbackSchema. As a result, readers don't knowpayload.workflowIdandpayload.statusexist at top-level (which is needed to update the correspondingLinkDocumenton callback).What to do
Document
CallbackSchemaand the canonical extension pattern, and mirror it into every HITL feature/example doc.Affected area
build/patterns/human-in-the-loop.md,registry/features/hitl-module.md, every HITL example docAcceptance criteria
payload.workflowIdand theLinkDocumentflow is shown explicitly.Additional context
Surfaced during a benchmark agent session. See
todo-docs.md#5.