// Object-literal getter: reading `.val` invokes the getter, whose return summary // (the captured secret) must be the field's read value. const secret = await agent("writer").ask("secret"); const wrapper = { get val(): string { return secret; }, }; const out = await agent("reader").ask(`use ${wrapper.val}`); return out;