fix(subagent): type the schema-resolved reportDelivery shape

Config() applies the schemastery default at runtime, but its return type
keeps the input's optional field, so assert the resolved shape at the
seam — keeping the dead fallback branch gone.
This commit is contained in:
Tianyi Cui
2026-08-02 12:39:35 +08:00
parent 902b46b86b
commit df01ed926a
2 changed files with 5 additions and 2 deletions

View File

@@ -88,7 +88,10 @@ export function installReportTool(
* @param config - deployment scheduling policy.
*/
export function apply(ctx: Context, config: Config = {}): void {
const { reportDelivery } = Config(config)
// Config() applies the schema default ('quiet') at runtime; the schemastery
// return type keeps the input's optional shape, so assert the resolved
// shape here — no runtime fallback exists or is wanted.
const { reportDelivery } = Config(config) as { reportDelivery: SubagentReportDelivery }
ctx.subagents.registerContinuableSetup(childCtx =>
installReportTool(childCtx, ctx, reportDelivery))
}