feat(directory): add cancellation-aware operations (#10339)